jiebi/CodeConvo huggingface dataset:
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: tcx.sess, span, E0752, <del> "start is not allowed to be `async`" </del> <ins> "`start` is not allowed to be `async`" </ins> ) <del> .span_label(span, "start is not allowed to be `async`") </del> <ins> .span_label(span, "`start` is not allowed to be `async`") </ins> .emit(); error = true; } <ins> for attr in it.attrs { if attr.check_name(sym::track_caller) { tcx.sess .struct_span_err( attr.span, "`start` is not allowed to be `#[track_caller]`", ) .span_label( start_span, "`start` is not allowed to be `#[track_caller]`", ) .emit(); error = true; } } </ins> if error { return; }
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: #[start] pub async fn start(_: isize, _: *const *const u8) -> isize { <del> //~^ ERROR start is not allowed to be `async` </del> <ins> //~^ ERROR `start` is not allowed to be `async` </ins> 0 }
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: <del> error[E0752]: start is not allowed to be `async` </del> <ins> error[E0752]: `start` is not allowed to be `async` </ins> --> $DIR/issue-68523-start.rs:6:1 | LL | pub async fn start(_: isize, _: *const *const u8) -> isize { <del> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ start is not allowed to be `async` </del> <ins> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `start` is not allowed to be `async` </ins> error: aborting due to previous error
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: <ins> #[track_caller] //~ ERROR `main` function is not allowed to be fn main() { panic!("{}: oh no", std::panic::Location::caller()); } </ins>
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: <ins> error: `main` function is not allowed to be `#[track_caller]` --> $DIR/error-with-main.rs:1:1 | LL |   #[track_caller] |   ^^^^^^^^^^^^^^^ LL | / fn main() { LL | |     panic!("{}: oh no", std::panic::Location::caller()); LL | | } | |_- `main` function is not allowed to be `#[track_caller]` error: aborting due to previous error </ins>
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: <ins> #![feature(start)] #[start] #[track_caller] //~ ERROR `start` is not allowed to be `#[track_caller]` fn start(_argc: isize, _argv: *const *const u8) -> isize { panic!("{}: oh no", std::panic::Location::caller()); } </ins>
Code change:
Crash occurs in both 1.46.0 beta and in current nightly. : <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I made the false assumption that this was rustc crashing, but it's actually the binary that crashes upon running it.
Cc We probably just want to ban track caller on main (and maybe any lang item function?)
claim
Same with : results in edit: I think is a more general problem so I won't change that here
Assigning as and removing .

Related discussion:
text: <ins> error: `start` is not allowed to be `#[track_caller]` --> $DIR/error-with-start.rs:4:1 | LL |   #[track_caller] |   ^^^^^^^^^^^^^^^ LL | / fn start(_argc: isize, _argv: *const *const u8) -> isize { LL | |     panic!("{}: oh no", std::panic::Location::caller()); LL | | } | |_- `start` is not allowed to be `#[track_caller]` error: aborting due to previous error </ins>
Code change:
Been working in JavaScript a lot lately and find myself accidentally typing this a lot. It would be nice to automatically detect this and offer a proper fix. Lots of languages use this syntax in addition to JavaScript so it seems like a reasonable error to make. Playground example below. () Errors:
I think the current error message is clear enough. Also I don't think providing auto-fix suggestion is easy, because the error happened when parsing AST.
Nice. But I still think the current error message is fine as is.
don't disagree, but handling it was relatively easy because there's no case where would be valid.

Related discussion:
text: return Ok(expr); } } <ins> if (op.node == AssocOp::Equal || op.node == AssocOp::NotEqual) && self.token.kind == token::Eq && self.prev_token.span.hi() == self.token.span.lo() { // Look for JS' `===` and `!==` and recover 😇 let sp = op.span.to(self.token.span); let sugg = match op.node { AssocOp::Equal => "==", AssocOp::NotEqual => "!=", _ => unreachable!(), }; self.struct_span_err(sp, &format!("invalid comparison operator `{}=`", sugg)) .span_suggestion_short( sp, &format!("`{s}=` is not a valid comparison operator, use `{s}`", s = sugg), sugg.to_string(), Applicability::MachineApplicable, ) .emit(); self.bump(); } </ins> let op = op.node; // Special cases: if op == AssocOp::As {
Code change:
Been working in JavaScript a lot lately and find myself accidentally typing this a lot. It would be nice to automatically detect this and offer a proper fix. Lots of languages use this syntax in addition to JavaScript so it seems like a reasonable error to make. Playground example below. () Errors:
I think the current error message is clear enough. Also I don't think providing auto-fix suggestion is easy, because the error happened when parsing AST.
Nice. But I still think the current error message is fine as is.
don't disagree, but handling it was relatively easy because there's no case where would be valid.

Related discussion:
text: <ins> fn main() { if 1 == = 1 { //~ ERROR expected expression println!("yup!"); } } </ins>
Code change:
Been working in JavaScript a lot lately and find myself accidentally typing this a lot. It would be nice to automatically detect this and offer a proper fix. Lots of languages use this syntax in addition to JavaScript so it seems like a reasonable error to make. Playground example below. () Errors:
I think the current error message is clear enough. Also I don't think providing auto-fix suggestion is easy, because the error happened when parsing AST.
Nice. But I still think the current error message is fine as is.
don't disagree, but handling it was relatively easy because there's no case where would be valid.

Related discussion:
text: <ins> error: expected expression, found `=` --> $DIR/js-style-comparison-op-separate-eq-token.rs:2:13 | LL |     if 1 == = 1 { |             ^ expected expression error: aborting due to previous error </ins>
Code change:
Been working in JavaScript a lot lately and find myself accidentally typing this a lot. It would be nice to automatically detect this and offer a proper fix. Lots of languages use this syntax in addition to JavaScript so it seems like a reasonable error to make. Playground example below. () Errors:
I think the current error message is clear enough. Also I don't think providing auto-fix suggestion is easy, because the error happened when parsing AST.
Nice. But I still think the current error message is fine as is.
don't disagree, but handling it was relatively easy because there's no case where would be valid.

Related discussion:
text: <ins> // run-rustfix fn main() { if 1 == 1 { //~ ERROR invalid comparison operator `===` println!("yup!"); } else if 1 != 1 { //~ ERROR invalid comparison operator `!==` println!("nope!"); } } </ins>
Code change:
Been working in JavaScript a lot lately and find myself accidentally typing this a lot. It would be nice to automatically detect this and offer a proper fix. Lots of languages use this syntax in addition to JavaScript so it seems like a reasonable error to make. Playground example below. () Errors:
I think the current error message is clear enough. Also I don't think providing auto-fix suggestion is easy, because the error happened when parsing AST.
Nice. But I still think the current error message is fine as is.
don't disagree, but handling it was relatively easy because there's no case where would be valid.

Related discussion:
text: <ins> // run-rustfix fn main() { if 1 === 1 { //~ ERROR invalid comparison operator `===` println!("yup!"); } else if 1 !== 1 { //~ ERROR invalid comparison operator `!==` println!("nope!"); } } </ins>
Code change:
Been working in JavaScript a lot lately and find myself accidentally typing this a lot. It would be nice to automatically detect this and offer a proper fix. Lots of languages use this syntax in addition to JavaScript so it seems like a reasonable error to make. Playground example below. () Errors:
I think the current error message is clear enough. Also I don't think providing auto-fix suggestion is easy, because the error happened when parsing AST.
Nice. But I still think the current error message is fine as is.
don't disagree, but handling it was relatively easy because there's no case where would be valid.

Related discussion:
text: <ins> error: invalid comparison operator `===` --> $DIR/js-style-comparison-op.rs:3:10 | LL |     if 1 === 1 { |          ^^^ help: `===` is not a valid comparison operator, use `==` error: invalid comparison operator `!==` --> $DIR/js-style-comparison-op.rs:5:17 | LL |     } else if 1 !== 1 { |                 ^^^ help: `!==` is not a valid comparison operator, use `!=` error: aborting due to 2 previous errors </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> #![feature(associated_type_defaults)] #![feature(generic_associated_types)] #![allow(incomplete_features)] trait Trait1 { fn foo(); } trait Trait2 { type Associated: Trait1 = Self; //~^ ERROR: the trait bound `Self: Trait1` is not satisfied //~| the size for values of type `Self` cannot be known } impl Trait2 for () {} fn call_foo<T: Trait2>() { T::Associated::foo() } fn main() { call_foo::<()>() } </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> error[E0277]: the trait bound `Self: Trait1` is not satisfied --> $DIR/issue-74816.rs:10:5 | LL |     type Associated: Trait1 = Self; |     ^^^^^^^^^^^^^^^^^------^^^^^^^^ |     |                | |     |                required by this bound in `Trait2::Associated` |     the trait `Trait1` is not implemented for `Self` | help: consider further restricting `Self` | LL | trait Trait2: Trait1 { |             ^^^^^^^^ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/issue-74816.rs:10:5 | LL |     type Associated: Trait1 = Self; |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |     | |     doesn't have a size known at compile-time |     required by this bound in `Trait2::Associated` | help: consider further restricting `Self` | LL | trait Trait2: Sized { |             ^^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> #![feature(type_alias_impl_trait)] #![feature(impl_trait_in_bindings)] #![allow(incomplete_features)] type FooArg<'a> = &'a dyn ToString; type FooRet = impl std::fmt::Debug; type FooItem = Box<dyn Fn(FooArg) -> FooRet>; type Foo = impl Iterator<Item = FooItem>; //~ ERROR: type mismatch #[repr(C)] struct Bar(u8); impl Iterator for Bar { type Item = FooItem; fn next(&mut self) -> Option<Self::Item> { Some(Box::new(quux)) } } fn quux(st: FooArg) -> FooRet { Some(st.to_string()) } fn ham() -> Foo { Bar(1) } fn oof() -> impl std::fmt::Debug { let mut bar = ham(); let func = bar.next().unwrap(); return func(&"oof"); } fn main() { let _ = oof(); } </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>` --> $DIR/issue-70877.rs:9:12 | LL | type FooRet = impl std::fmt::Debug; |               -------------------- the expected opaque type ... LL | type Foo = impl Iterator<Item = FooItem>; |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found enum `Option` | = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>` found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>` error: aborting due to previous error For more information about this error, try `rustc --explain E0271`. </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> // check-pass // Regression test of #70944, should compile fine. use std::ops::Index; pub struct KeyA; pub struct KeyB; pub struct KeyC; pub trait Foo: Index<KeyA> + Index<KeyB> + Index<KeyC> {} pub trait FooBuilder { type Inner: Foo; fn inner(&self) -> &Self::Inner; } pub fn do_stuff(foo: &impl FooBuilder) { let inner = foo.inner(); &inner[KeyA]; &inner[KeyB]; &inner[KeyC]; } fn main() {} </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> // check-pass #![feature(trait_alias)] struct Bar; trait Foo {} impl Foo for Bar {} trait Baz = Foo where Bar: Foo; fn new() -> impl Baz { Bar } fn main() { let _ = new(); } </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> #![feature(unsize)] use std::marker::Unsize; pub trait CastTo<T: ?Sized>: Unsize<T> { fn cast_to(&self) -> &T; } impl<T: ?Sized, U: ?Sized + Unsize<T>> CastTo<T> for U { fn cast_to(&self) -> &T { self } } impl<T: ?Sized> Cast for T {} pub trait Cast { fn cast<T: ?Sized>(&self) -> &T where Self: CastTo<T>, { self } } pub trait Foo: CastTo<[i32]> {} impl Foo for [i32; 0] {} fn main() { let x: &dyn Foo = &[]; let x = x.cast::<[i32]>(); //~^ ERROR: the trait bound `dyn Foo: CastTo<[i32]>` is not satisfied } </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> error[E0277]: the trait bound `dyn Foo: CastTo<[i32]>` is not satisfied --> $DIR/issue-71659.rs:30:15 | LL |     let x = x.cast::<[i32]>(); |               ^^^^ the trait `CastTo<[i32]>` is not implemented for `dyn Foo` error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> pub trait Callback { fn cb(); } pub trait Processing { type Call: Callback; } fn f<P: Processing + ?Sized>() { P::Call::cb(); } fn main() { struct MyCall; f::<dyn Processing<Call = MyCall>>(); //~^ ERROR: the trait bound `MyCall: Callback` is not satisfied } </ins>
Code change:
<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Given that it doesn't reproduce on godbolt I guess this is apple specific?.
I can reproduce it in playground: godbolt builds Rust code as by default.
Assigning as and removing .
There is no need for containing . Renaming to anything and make it is suffice. The error traces back to 1.0 Rust release:
here is the unwrap to blame.
Triage: This is no longer ICE with the latest nightly, marking as E-needs-test.

Related discussion:
text: <ins> error[E0277]: the trait bound `MyCall: Callback` is not satisfied --> $DIR/issue-75707.rs:15:5 | LL | fn f<P: Processing + ?Sized>() { |         ---------- required by this bound in `f` ... LL |     f::<dyn Processing<Call = MyCall>>(); |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Callback` is not implemented for `MyCall` error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. </ins>