diff options
| author | nxya <nathacutlan@gmail.com> | 2023-07-12 22:59:01 -0400 |
|---|---|---|
| committer | nxya <nathacutlan@gmail.com> | 2023-07-18 09:20:25 -0400 |
| commit | bef91ee6878e3710c0a31f7570c837131e184e0c (patch) | |
| tree | 21a682526ac5da65d1890133e3bbe200fb466df4 /tests/ui/consts | |
| parent | c429a72db9515eb3244d6da8c09c15c520aee9db (diff) | |
| download | rust-bef91ee6878e3710c0a31f7570c837131e184e0c.tar.gz rust-bef91ee6878e3710c0a31f7570c837131e184e0c.zip | |
added links as a note
Diffstat (limited to 'tests/ui/consts')
| -rw-r--r-- | tests/ui/consts/const-size_of-cycle.stderr | 7 | ||||
| -rw-r--r-- | tests/ui/consts/issue-103790.stderr | 14 | ||||
| -rw-r--r-- | tests/ui/consts/issue-36163.stderr | 7 | ||||
| -rw-r--r-- | tests/ui/consts/issue-44415.stderr | 7 | ||||
| -rw-r--r-- | tests/ui/consts/recursive-zst-static.default.stderr | 7 | ||||
| -rw-r--r-- | tests/ui/consts/recursive-zst-static.unleash.stderr | 7 | ||||
| -rw-r--r-- | tests/ui/consts/write-to-static-mut-in-static.stderr | 7 |
7 files changed, 48 insertions, 8 deletions
diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr index 28448223a2a..3a18c769246 100644 --- a/tests/ui/consts/const-size_of-cycle.stderr +++ b/tests/ui/consts/const-size_of-cycle.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when evaluating type-level constant. 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[E0391]: cycle detected when evaluating type-level constant --> $DIR/const-size_of-cycle.rs:4:17 | LL | bytes: [u8; std::mem::size_of::<Foo>()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/const-size_of-cycle.rs:4:17 + | +LL | bytes: [u8; std::mem::size_of::<Foo>()] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`... --> $DIR/const-size_of-cycle.rs:4:17 | diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr index 7eae2555ca1..917c8b1173e 100644 --- a/tests/ui/consts/issue-103790.stderr +++ b/tests/ui/consts/issue-103790.stderr @@ -22,12 +22,17 @@ help: add missing generic argument LL | struct S<const S: (), const S: S<S> = { S }>; | +++ -error[E0391]: cycle detected when computing type of `S::S`. 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[E0391]: cycle detected when computing type of `S::S` --> $DIR/issue-103790.rs:4:32 | LL | struct S<const S: (), const S: S = { S }>; | ^ | +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 + --> $DIR/issue-103790.rs:4:32 + | +LL | struct S<const S: (), const S: S = { S }>; + | ^ = note: ...which immediately requires computing type of `S::S` again note: cycle used when computing type of `S` --> $DIR/issue-103790.rs:4:1 @@ -35,12 +40,17 @@ note: cycle used when computing type of `S` LL | struct S<const S: (), const S: S = { S }>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0391]: cycle detected when computing type of `S`. 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[E0391]: cycle detected when computing type of `S` --> $DIR/issue-103790.rs:4:1 | LL | struct S<const S: (), const S: S = { S }>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-103790.rs:4:1 + | +LL | struct S<const S: (), const S: S = { S }>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires computing type of `S::S`... --> $DIR/issue-103790.rs:4:32 | diff --git a/tests/ui/consts/issue-36163.stderr b/tests/ui/consts/issue-36163.stderr index 2188dc0e356..fb2866554ff 100644 --- a/tests/ui/consts/issue-36163.stderr +++ b/tests/ui/consts/issue-36163.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}`. 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[E0391]: cycle detected when const-evaluating + checking `Foo::B::{constant#0}` --> $DIR/issue-36163.rs:4:9 | LL | B = A, | ^ | +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 + --> $DIR/issue-36163.rs:4:9 + | +LL | B = A, + | ^ note: ...which requires const-evaluating + checking `A`... --> $DIR/issue-36163.rs:1:18 | diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr index 02be3e644f8..12284ff2fb2 100644 --- a/tests/ui/consts/issue-44415.stderr +++ b/tests/ui/consts/issue-44415.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when evaluating type-level constant. 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[E0391]: cycle detected when evaluating type-level constant --> $DIR/issue-44415.rs:6:17 | LL | bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/issue-44415.rs:6:17 + | +LL | bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }], + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`... --> $DIR/issue-44415.rs:6:17 | diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr index e4838e92710..7f9d7c1cb8b 100644 --- a/tests/ui/consts/recursive-zst-static.default.stderr +++ b/tests/ui/consts/recursive-zst-static.default.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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[E0391]: cycle detected when const-evaluating + checking `FOO` --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; | ^^^^^^^^^^^^^^ | +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 + --> $DIR/recursive-zst-static.rs:10:1 + | +LL | static FOO: () = FOO; + | ^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-zst-static.rs:10:18 | diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr index e4838e92710..7f9d7c1cb8b 100644 --- a/tests/ui/consts/recursive-zst-static.unleash.stderr +++ b/tests/ui/consts/recursive-zst-static.unleash.stderr @@ -1,9 +1,14 @@ -error[E0391]: cycle detected when const-evaluating + checking `FOO`. 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[E0391]: cycle detected when const-evaluating + checking `FOO` --> $DIR/recursive-zst-static.rs:10:1 | LL | static FOO: () = FOO; | ^^^^^^^^^^^^^^ | +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 + --> $DIR/recursive-zst-static.rs:10:1 + | +LL | static FOO: () = FOO; + | ^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `FOO`... --> $DIR/recursive-zst-static.rs:10:18 | diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr index 8816f952d16..74c636c357b 100644 --- a/tests/ui/consts/write-to-static-mut-in-static.stderr +++ b/tests/ui/consts/write-to-static-mut-in-static.stderr @@ -4,12 +4,17 @@ error[E0080]: could not evaluate static initializer LL | pub static mut B: () = unsafe { A = 1; }; | ^^^^^ modifying a static's initial value from another static's initializer -error[E0391]: cycle detected when const-evaluating + checking `C`. 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[E0391]: cycle detected when const-evaluating + checking `C` --> $DIR/write-to-static-mut-in-static.rs:5:1 | LL | pub static mut C: u32 = unsafe { C = 1; 0 }; | ^^^^^^^^^^^^^^^^^^^^^ | +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 + --> $DIR/write-to-static-mut-in-static.rs:5:1 + | +LL | pub static mut C: u32 = unsafe { C = 1; 0 }; + | ^^^^^^^^^^^^^^^^^^^^^ note: ...which requires const-evaluating + checking `C`... --> $DIR/write-to-static-mut-in-static.rs:5:34 | |
