Skip to content

Commit

Permalink
add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directive
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Mar 22, 2024
1 parent 15ef7a0 commit 68143f5
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// ICE #90691 Encountered error `Unimplemented` selecting ...
//@ build-pass
// issue: rust-lang/rust#90691

trait TError: std::fmt::Debug {}
impl TError for () {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ check-pass

// issue: rust-lang/rust#88421
#![feature(adt_const_params)]
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/ice-bad-input-type-for-cast-83056.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// #83056 ICE "bad input type for cast"
// issue: rust-lang/rust#83056

struct S([bool; f as usize]);
fn f() -> T {}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/ice-bad-input-type-for-cast-83056.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0412]: cannot find type `T` in this scope
--> $DIR/ice-bad-input-type-for-cast-83056.rs:4:11
--> $DIR/ice-bad-input-type-for-cast-83056.rs:5:11
|
LL | struct S([bool; f as usize]);
| ----------------------------- similarly named struct `S` defined here
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// test for #52334 ICE when casting extern "C" fn when it has a non-FFI-safe argument
//@ check-pass

// issue: rust-lang/rust#52334
type Foo = extern "C" fn(::std::ffi::CStr);
//~^ WARN `extern` fn uses type `[i8]`, which is not FFI-safe
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/extern/extern-C-str-arg-ice-80125.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// test for #80125
// issue: rust-lang/rust#80125
//@ check-pass
type ExternCallback = extern "C" fn(*const u8, u32, str);
//~^ WARN `extern` fn uses type `str`, which is not FFI-safe
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// ICE #64784 already borrowed: BorrowMutError
//@ check-pass
// issue: rust-lang/rust#64784
#![feature(decl_macro)]

pub macro m($i:ident, $j:ident) {
Expand Down
25 changes: 25 additions & 0 deletions tests/ui/sized/stack-overflow-trait-infer-98842.32bit.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
error[E0391]: cycle detected when computing layout of `Foo`
|
= note: ...which requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`...
= note: ...which again requires computing layout of `Foo`, completing the cycle
note: cycle used when const-evaluating + checking `_`
--> $DIR/stack-overflow-trait-infer-98842.rs:15:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0080]: it is undefined behavior to use this value
--> $DIR/stack-overflow-trait-infer-98842.rs:15:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
|
= note: the raw bytes of the constant (size: 4, align: 4) {
00 00 00 00 │ ........
}

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0080, E0391.
For more information about an error, try `rustc --explain E0080`.
25 changes: 25 additions & 0 deletions tests/ui/sized/stack-overflow-trait-infer-98842.64bit.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
error[E0391]: cycle detected when computing layout of `Foo`
|
= note: ...which requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`...
= note: ...which again requires computing layout of `Foo`, completing the cycle
note: cycle used when const-evaluating + checking `_`
--> $DIR/stack-overflow-trait-infer-98842.rs:15:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0080]: it is undefined behavior to use this value
--> $DIR/stack-overflow-trait-infer-98842.rs:15:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
|
= note: the raw bytes of the constant (size: 8, align: 8) {
00 00 00 00 00 00 00 00 │ ........
}

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0080, E0391.
For more information about an error, try `rustc --explain E0080`.
5 changes: 4 additions & 1 deletion tests/ui/sized/stack-overflow-trait-infer-98842.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// #98842 stack overflow in trait inference
// issue: rust-lang/rust#98842
//@ check-fail
//@ edition:2021
//~^^^ ERROR cycle detected when computing layout of `Foo`
//@ stderr-per-bitwidth
//@ ignore-endian-big
//~^^^^^^ ERROR cycle detected when computing layout of `Foo`

// If the inner `Foo` is named through an associated type,
// the "infinite size" error does not occur.
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/sized/stack-overflow-trait-infer-98842.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ error[E0391]: cycle detected when computing layout of `Foo`
= note: ...which requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`...
= note: ...which again requires computing layout of `Foo`, completing the cycle
note: cycle used when const-evaluating + checking `_`
--> $DIR/stack-overflow-trait-infer-98842.rs:12:1
--> $DIR/stack-overflow-trait-infer-98842.rs:13:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0080]: it is undefined behavior to use this value
--> $DIR/stack-overflow-trait-infer-98842.rs:12:1
--> $DIR/stack-overflow-trait-infer-98842.rs:13:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ICE size_and_align_of::<[[email protected]:15:5: 17:7]> not supported #88212

// issue: rust-lang/rust#88212
#![feature(unsized_locals)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes

Expand Down

0 comments on commit 68143f5

Please sign in to comment.