diff --git a/tests/ui/associated-consts/ambiguous-associated-type-error-78622.rs b/tests/ui/associated-types/ambiguous-associated-type-error-78622.rs similarity index 100% rename from tests/ui/associated-consts/ambiguous-associated-type-error-78622.rs rename to tests/ui/associated-types/ambiguous-associated-type-error-78622.rs diff --git a/tests/ui/associated-consts/ambiguous-associated-type-error-78622.stderr b/tests/ui/associated-types/ambiguous-associated-type-error-78622.stderr similarity index 100% rename from tests/ui/associated-consts/ambiguous-associated-type-error-78622.stderr rename to tests/ui/associated-types/ambiguous-associated-type-error-78622.stderr diff --git a/tests/ui/mismatched_types/mismatched-types-in-trait-implementation-87490.rs b/tests/ui/associated-types/mismatched-types-in-associated-type-87490.rs similarity index 100% rename from tests/ui/mismatched_types/mismatched-types-in-trait-implementation-87490.rs rename to tests/ui/associated-types/mismatched-types-in-associated-type-87490.rs diff --git a/tests/ui/mismatched_types/mismatched-types-in-trait-implementation-87490.stderr b/tests/ui/associated-types/mismatched-types-in-associated-type-87490.stderr similarity index 87% rename from tests/ui/mismatched_types/mismatched-types-in-trait-implementation-87490.stderr rename to tests/ui/associated-types/mismatched-types-in-associated-type-87490.stderr index bbd73347d0272..0a2dbcdc27b75 100644 --- a/tests/ui/mismatched_types/mismatched-types-in-trait-implementation-87490.stderr +++ b/tests/ui/associated-types/mismatched-types-in-associated-type-87490.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/mismatched-types-in-trait-implementation-87490.rs:10:5 + --> $DIR/mismatched-types-in-associated-type-87490.rs:10:5 | LL | fn follow(_: &str) -> <&str as StreamOnce>::Position { | ------------------------------ expected `usize` because of return type diff --git a/tests/ui/issues/issue-72076.rs b/tests/ui/associated-types/missing-default-associated-type-72076.rs similarity index 64% rename from tests/ui/issues/issue-72076.rs rename to tests/ui/associated-types/missing-default-associated-type-72076.rs index 1659044a64fe1..c25bdff16fd2e 100644 --- a/tests/ui/issues/issue-72076.rs +++ b/tests/ui/associated-types/missing-default-associated-type-72076.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/72076 trait X { type S; fn f() -> Self::S {} //~ ERROR mismatched types diff --git a/tests/ui/issues/issue-72076.stderr b/tests/ui/associated-types/missing-default-associated-type-72076.stderr similarity index 90% rename from tests/ui/issues/issue-72076.stderr rename to tests/ui/associated-types/missing-default-associated-type-72076.stderr index a08704c907327..c91dbb6d5c858 100644 --- a/tests/ui/issues/issue-72076.stderr +++ b/tests/ui/associated-types/missing-default-associated-type-72076.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-72076.rs:3:23 + --> $DIR/missing-default-associated-type-72076.rs:4:23 | LL | fn f() -> Self::S {} | ^^ expected associated type, found `()` diff --git a/tests/ui/binding/invalid-assignment-in-while-loop-77218.fixed b/tests/ui/binding/invalid-assignment-in-while-77218.fixed similarity index 100% rename from tests/ui/binding/invalid-assignment-in-while-loop-77218.fixed rename to tests/ui/binding/invalid-assignment-in-while-77218.fixed diff --git a/tests/ui/binding/invalid-assignment-in-while-loop-77218.rs b/tests/ui/binding/invalid-assignment-in-while-77218.rs similarity index 100% rename from tests/ui/binding/invalid-assignment-in-while-loop-77218.rs rename to tests/ui/binding/invalid-assignment-in-while-77218.rs diff --git a/tests/ui/binding/invalid-assignment-in-while-loop-77218.stderr b/tests/ui/binding/invalid-assignment-in-while-77218.stderr similarity index 88% rename from tests/ui/binding/invalid-assignment-in-while-loop-77218.stderr rename to tests/ui/binding/invalid-assignment-in-while-77218.stderr index e6baf349d28ad..0545a01309978 100644 --- a/tests/ui/binding/invalid-assignment-in-while-loop-77218.stderr +++ b/tests/ui/binding/invalid-assignment-in-while-77218.stderr @@ -1,5 +1,5 @@ error[E0070]: invalid left-hand side of assignment - --> $DIR/invalid-assignment-in-while-loop-77218.rs:5:19 + --> $DIR/invalid-assignment-in-while-77218.rs:5:19 | LL | while Some(0) = value.get(0) {} | - ^ diff --git a/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.rs b/tests/ui/binop/binary-operation-error-on-function-70724.rs similarity index 77% rename from tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.rs rename to tests/ui/binop/binary-operation-error-on-function-70724.rs index c2683157f797f..0bbf13761488d 100644 --- a/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.rs +++ b/tests/ui/binop/binary-operation-error-on-function-70724.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/70724 fn a() -> i32 { 3 } diff --git a/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr b/tests/ui/binop/binary-operation-error-on-function-70724.stderr similarity index 87% rename from tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr rename to tests/ui/binop/binary-operation-error-on-function-70724.stderr index 736002c9335a3..11b0e4ba19c58 100644 --- a/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr +++ b/tests/ui/binop/binary-operation-error-on-function-70724.stderr @@ -1,5 +1,5 @@ error[E0369]: binary operation `==` cannot be applied to type `fn() -> i32 {a}` - --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 + --> $DIR/binary-operation-error-on-function-70724.rs:7:5 | LL | assert_eq!(a, 0); | ^^^^^^^^^^^^^^^^ @@ -10,7 +10,7 @@ LL | assert_eq!(a, 0); = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types - --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 + --> $DIR/binary-operation-error-on-function-70724.rs:7:5 | LL | assert_eq!(a, 0); | ^^^^^^^^^^^^^^^^ expected fn item, found integer @@ -20,7 +20,7 @@ LL | assert_eq!(a, 0); = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug` - --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 + --> $DIR/binary-operation-error-on-function-70724.rs:7:5 | LL | fn a() -> i32 { | - consider calling this function diff --git a/tests/ui/borrowck/incorrect-use-after-storage-end-78192.rs b/tests/ui/borrowck/pointer-reassignment-after-deref-78192.rs similarity index 100% rename from tests/ui/borrowck/incorrect-use-after-storage-end-78192.rs rename to tests/ui/borrowck/pointer-reassignment-after-deref-78192.rs diff --git a/tests/ui/issues/issue-72002.rs b/tests/ui/coercion/index-coercion-over-indexmut-72002.rs similarity index 90% rename from tests/ui/issues/issue-72002.rs rename to tests/ui/coercion/index-coercion-over-indexmut-72002.rs index ce3463069b881..826cc99fe2ad7 100644 --- a/tests/ui/issues/issue-72002.rs +++ b/tests/ui/coercion/index-coercion-over-indexmut-72002.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/72002 //@ check-pass struct Indexable; diff --git a/tests/ui/attributes/invalid-attributes-on-const-params-78957.rs b/tests/ui/const-generics/invalid-attributes-on-const-params-78957.rs similarity index 100% rename from tests/ui/attributes/invalid-attributes-on-const-params-78957.rs rename to tests/ui/const-generics/invalid-attributes-on-const-params-78957.rs diff --git a/tests/ui/attributes/invalid-attributes-on-const-params-78957.stderr b/tests/ui/const-generics/invalid-attributes-on-const-params-78957.stderr similarity index 100% rename from tests/ui/attributes/invalid-attributes-on-const-params-78957.stderr rename to tests/ui/const-generics/invalid-attributes-on-const-params-78957.stderr diff --git a/tests/ui/ffi/extern-static-mut-slice-54410.rs b/tests/ui/ffi/extern-static-mut-slice-54410.rs new file mode 100644 index 0000000000000..0c967229bde25 --- /dev/null +++ b/tests/ui/ffi/extern-static-mut-slice-54410.rs @@ -0,0 +1,9 @@ +// https://github.com/rust-lang/rust/issues/54410 +extern "C" { + pub static mut symbol: [i8]; + //~^ ERROR the size for values of type `[i8]` cannot be known at compilation time +} + +fn main() { + println!("{:p}", unsafe { &symbol }); +} diff --git a/tests/ui/ffi/extern-static-mut-slice-54410.stderr b/tests/ui/ffi/extern-static-mut-slice-54410.stderr new file mode 100644 index 0000000000000..73368366dc5cd --- /dev/null +++ b/tests/ui/ffi/extern-static-mut-slice-54410.stderr @@ -0,0 +1,12 @@ +error[E0277]: the size for values of type `[i8]` cannot be known at compilation time + --> $DIR/extern-static-mut-slice-54410.rs:3:5 + | +LL | pub static mut symbol: [i8]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: the trait `Sized` is not implemented for `[i8]` + = note: statics and constants must have a statically known size + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/issues/issue-70381.rs b/tests/ui/fmt/unicode-format-string-missing-parameter-70381.rs similarity index 76% rename from tests/ui/issues/issue-70381.rs rename to tests/ui/fmt/unicode-format-string-missing-parameter-70381.rs index 3df8277b87372..fad2fd884a80a 100644 --- a/tests/ui/issues/issue-70381.rs +++ b/tests/ui/fmt/unicode-format-string-missing-parameter-70381.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/70381 // Test that multi-byte unicode characters with missing parameters do not ICE. fn main() { diff --git a/tests/ui/issues/issue-70381.stderr b/tests/ui/fmt/unicode-format-string-missing-parameter-70381.stderr similarity index 72% rename from tests/ui/issues/issue-70381.stderr rename to tests/ui/fmt/unicode-format-string-missing-parameter-70381.stderr index 298a1cf9e0d5f..cfcff0e5582c2 100644 --- a/tests/ui/issues/issue-70381.stderr +++ b/tests/ui/fmt/unicode-format-string-missing-parameter-70381.stderr @@ -1,5 +1,5 @@ error: 1 positional argument in format string, but no arguments were given - --> $DIR/issue-70381.rs:4:16 + --> $DIR/unicode-format-string-missing-parameter-70381.rs:5:16 | LL | println!("\r¡{}") | ^^ diff --git a/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.rs b/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.rs new file mode 100644 index 0000000000000..d1a4e09243ecf --- /dev/null +++ b/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.rs @@ -0,0 +1,20 @@ +// https://github.com/rust-lang/rust/issues/60218 +// Regression test for #60218 +// +// This was reported to cause ICEs. + +use std::iter::Map; + +pub trait Foo {} + +pub fn trigger_error(iterable: I, functor: F) +where + for<'t> &'t I: IntoIterator, +for<'t> Map<<&'t I as IntoIterator>::IntoIter, F>: Iterator, +for<'t> ::IntoIter, F> as Iterator>::Item: Foo, +{ +} + +fn main() { + trigger_error(vec![], |x: &u32| x) //~ ERROR E0277 +} diff --git a/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.stderr b/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.stderr new file mode 100644 index 0000000000000..4c403bcbd601f --- /dev/null +++ b/tests/ui/higher-ranked-trait-bounds/higher-trait-bounds-ice-60218.stderr @@ -0,0 +1,25 @@ +error[E0277]: the trait bound `&u32: Foo` is not satisfied + --> $DIR/higher-trait-bounds-ice-60218.rs:19:19 + | +LL | trigger_error(vec![], |x: &u32| x) + | ------------- ^^^^^^ the trait `Foo` is not implemented for `&u32` + | | + | required by a bound introduced by this call + | +help: this trait has no implementations, consider adding one + --> $DIR/higher-trait-bounds-ice-60218.rs:8:1 + | +LL | pub trait Foo {} + | ^^^^^^^^^^^^^ +note: required by a bound in `trigger_error` + --> $DIR/higher-trait-bounds-ice-60218.rs:14:72 + | +LL | pub fn trigger_error(iterable: I, functor: F) + | ------------- required by a bound in this function +... +LL | for<'t> ::IntoIter, F> as Iterator>::Item: Foo, + | ^^^ required by this bound in `trigger_error` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs b/tests/ui/instrument-coverage/msvc-link-dead-code-inline-always-85461.rs similarity index 100% rename from tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs rename to tests/ui/instrument-coverage/msvc-link-dead-code-inline-always-85461.rs diff --git a/tests/ui/issues/issue-72278.rs b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs similarity index 73% rename from tests/ui/issues/issue-72278.rs rename to tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs index 2a9cd9423915f..81e4d3e7043bd 100644 --- a/tests/ui/issues/issue-72278.rs +++ b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/72278 +// and https://github.com/rust-lang/rust/issues/42868 //@ run-pass #![allow(unused)] diff --git a/tests/ui/issues/issue-72278.stderr b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.stderr similarity index 90% rename from tests/ui/issues/issue-72278.stderr rename to tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.stderr index 91efada3d8d12..cffdf0df83cc6 100644 --- a/tests/ui/issues/issue-72278.stderr +++ b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.stderr @@ -1,5 +1,5 @@ warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/issue-72278.rs:14:14 + --> $DIR/late-bound-lifetime-arguments-warning-72278.rs:16:14 | LL | fn func<'a, U>(&'a self) -> U { | -- the late bound lifetime parameter is introduced here diff --git a/tests/ui/mir/mir-cfg-unpretty-check-81918.rs b/tests/ui/mir/mir-cfg-unpretty-no-panic-81918.rs similarity index 100% rename from tests/ui/mir/mir-cfg-unpretty-check-81918.rs rename to tests/ui/mir/mir-cfg-unpretty-no-panic-81918.rs diff --git a/tests/ui/mismatched_types/auxiliary/aux-56943.rs b/tests/ui/mismatched_types/auxiliary/aux-56943.rs new file mode 100644 index 0000000000000..65b9beb91f90c --- /dev/null +++ b/tests/ui/mismatched_types/auxiliary/aux-56943.rs @@ -0,0 +1,3 @@ +pub struct S; +mod m { pub struct S; } +pub use crate::m::S as S2; diff --git a/tests/ui/pin/pin-deref-target-partial-eq-67039.rs b/tests/ui/pin/pin-deref-target-partial-eq-67039.rs new file mode 100644 index 0000000000000..541960012bd3a --- /dev/null +++ b/tests/ui/pin/pin-deref-target-partial-eq-67039.rs @@ -0,0 +1,28 @@ +// https://github.com/rust-lang/rust/issues/67039 +// Pin's PartialEq implementation allowed to access the pointer allowing for +// unsoundness by using Rc::get_mut to move value within Rc. +// See https://internals.rust-lang.org/t/unsoundness-in-pin/11311/73 for more details. + +use std::ops::Deref; +use std::pin::Pin; +use std::rc::Rc; + +struct Apple; + +impl Deref for Apple { + type Target = Apple; + fn deref(&self) -> &Apple { + &Apple + } +} + +impl PartialEq> for Apple { + fn eq(&self, _rc: &Rc) -> bool { + unreachable!() + } +} + +fn main() { + let _ = Pin::new(Apple) == Rc::pin(Apple); + //~^ ERROR type mismatch resolving +} diff --git a/tests/ui/pin/pin-deref-target-partial-eq-67039.stderr b/tests/ui/pin/pin-deref-target-partial-eq-67039.stderr new file mode 100644 index 0000000000000..541656dd7437e --- /dev/null +++ b/tests/ui/pin/pin-deref-target-partial-eq-67039.stderr @@ -0,0 +1,13 @@ +error[E0271]: type mismatch resolving ` as Deref>::Target == Rc` + --> $DIR/pin-deref-target-partial-eq-67039.rs:26:29 + | +LL | let _ = Pin::new(Apple) == Rc::pin(Apple); + | ^^ expected `Rc`, found `Apple` + | + = note: expected struct `Rc` + found struct `Apple` + = note: required for `Pin` to implement `PartialEq>>` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0271`. diff --git a/tests/ui/privacy/inaccessible-fields-pattern-matching-76077.fixed b/tests/ui/privacy/inaccessible-private-fields-76077.fixed similarity index 100% rename from tests/ui/privacy/inaccessible-fields-pattern-matching-76077.fixed rename to tests/ui/privacy/inaccessible-private-fields-76077.fixed diff --git a/tests/ui/privacy/inaccessible-fields-pattern-matching-76077.rs b/tests/ui/privacy/inaccessible-private-fields-76077.rs similarity index 100% rename from tests/ui/privacy/inaccessible-fields-pattern-matching-76077.rs rename to tests/ui/privacy/inaccessible-private-fields-76077.rs diff --git a/tests/ui/privacy/inaccessible-fields-pattern-matching-76077.stderr b/tests/ui/privacy/inaccessible-private-fields-76077.stderr similarity index 83% rename from tests/ui/privacy/inaccessible-fields-pattern-matching-76077.stderr rename to tests/ui/privacy/inaccessible-private-fields-76077.stderr index 070fa1a53a547..7b9f495920768 100644 --- a/tests/ui/privacy/inaccessible-fields-pattern-matching-76077.stderr +++ b/tests/ui/privacy/inaccessible-private-fields-76077.stderr @@ -1,5 +1,5 @@ error: pattern requires `..` due to inaccessible fields - --> $DIR/inaccessible-fields-pattern-matching-76077.rs:14:9 + --> $DIR/inaccessible-private-fields-76077.rs:14:9 | LL | let foo::Foo {} = foo::Foo::default(); | ^^^^^^^^^^^ @@ -10,7 +10,7 @@ LL | let foo::Foo { .. } = foo::Foo::default(); | ++ error: pattern requires `..` due to inaccessible fields - --> $DIR/inaccessible-fields-pattern-matching-76077.rs:17:9 + --> $DIR/inaccessible-private-fields-76077.rs:17:9 | LL | let foo::Bar { visible } = foo::Bar::default(); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/issues/auxiliary/issue-73112.rs b/tests/ui/repr/auxiliary/aux-73112.rs similarity index 100% rename from tests/ui/issues/auxiliary/issue-73112.rs rename to tests/ui/repr/auxiliary/aux-73112.rs diff --git a/tests/ui/issues/issue-74082.rs b/tests/ui/repr/invalid-repr-on-structs-74082.rs similarity index 79% rename from tests/ui/issues/issue-74082.rs rename to tests/ui/repr/invalid-repr-on-structs-74082.rs index e3e400c79d658..8b9807fad8ce2 100644 --- a/tests/ui/issues/issue-74082.rs +++ b/tests/ui/repr/invalid-repr-on-structs-74082.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/74082 #![allow(dead_code)] #[repr(i128)] //~ ERROR: attribute should be applied to an enum diff --git a/tests/ui/issues/issue-74082.stderr b/tests/ui/repr/invalid-repr-on-structs-74082.stderr similarity index 80% rename from tests/ui/issues/issue-74082.stderr rename to tests/ui/repr/invalid-repr-on-structs-74082.stderr index 12f5a3b27bb30..e11beb811fbff 100644 --- a/tests/ui/issues/issue-74082.stderr +++ b/tests/ui/repr/invalid-repr-on-structs-74082.stderr @@ -1,5 +1,5 @@ error[E0517]: attribute should be applied to an enum - --> $DIR/issue-74082.rs:3:8 + --> $DIR/invalid-repr-on-structs-74082.rs:4:8 | LL | #[repr(i128)] | ^^^^ @@ -7,7 +7,7 @@ LL | struct Foo; | ----------- not an enum error[E0517]: attribute should be applied to an enum - --> $DIR/issue-74082.rs:6:8 + --> $DIR/invalid-repr-on-structs-74082.rs:7:8 | LL | #[repr(u128)] | ^^^^ diff --git a/tests/ui/issues/issue-73112.rs b/tests/ui/repr/packed-struct-contains-aligned-type-73112.rs similarity index 58% rename from tests/ui/issues/issue-73112.rs rename to tests/ui/repr/packed-struct-contains-aligned-type-73112.rs index 89075b756249d..baeb75beb0aa1 100644 --- a/tests/ui/issues/issue-73112.rs +++ b/tests/ui/repr/packed-struct-contains-aligned-type-73112.rs @@ -1,9 +1,10 @@ -//@ aux-build:issue-73112.rs +// https://github.com/rust-lang/rust/issues/73112 +//@ aux-build:aux-73112.rs -extern crate issue_73112; +extern crate aux_73112; fn main() { - use issue_73112::PageTable; + use aux_73112::PageTable; #[repr(C, packed)] struct SomeStruct { diff --git a/tests/ui/issues/issue-73112.stderr b/tests/ui/repr/packed-struct-contains-aligned-type-73112.stderr similarity index 78% rename from tests/ui/issues/issue-73112.stderr rename to tests/ui/repr/packed-struct-contains-aligned-type-73112.stderr index c2c15ca10ce2e..237c357db22ba 100644 --- a/tests/ui/issues/issue-73112.stderr +++ b/tests/ui/repr/packed-struct-contains-aligned-type-73112.stderr @@ -1,11 +1,11 @@ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type - --> $DIR/issue-73112.rs:9:5 + --> $DIR/packed-struct-contains-aligned-type-73112.rs:10:5 | LL | struct SomeStruct { | ^^^^^^^^^^^^^^^^^ | note: `PageTable` has a `#[repr(align)]` attribute - --> $DIR/auxiliary/issue-73112.rs:8:1 + --> $DIR/auxiliary/aux-73112.rs:8:1 | LL | pub struct PageTable { | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/issues/issue-71406.rs b/tests/ui/resolve/function-module-ambiguity-error-71406.rs similarity index 74% rename from tests/ui/issues/issue-71406.rs rename to tests/ui/resolve/function-module-ambiguity-error-71406.rs index 6266112c3a86c..a7964de9ba5e2 100644 --- a/tests/ui/issues/issue-71406.rs +++ b/tests/ui/resolve/function-module-ambiguity-error-71406.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/71406 use std::sync::mpsc; fn main() { diff --git a/tests/ui/issues/issue-71406.stderr b/tests/ui/resolve/function-module-ambiguity-error-71406.stderr similarity index 85% rename from tests/ui/issues/issue-71406.stderr rename to tests/ui/resolve/function-module-ambiguity-error-71406.stderr index cd7921f550e5d..c25bafa0a5ddb 100644 --- a/tests/ui/issues/issue-71406.stderr +++ b/tests/ui/resolve/function-module-ambiguity-error-71406.stderr @@ -1,5 +1,5 @@ error[E0433]: failed to resolve: expected type, found function `channel` in `mpsc` - --> $DIR/issue-71406.rs:4:26 + --> $DIR/function-module-ambiguity-error-71406.rs:5:26 | LL | let (tx, rx) = mpsc::channel::new(1); | ^^^^^^^ expected type, found function `channel` in `mpsc` diff --git a/tests/ui/track-diagnostics/track-caller-for-once-87707.rs b/tests/ui/sync/track-caller-for-once-87707.rs similarity index 100% rename from tests/ui/track-diagnostics/track-caller-for-once-87707.rs rename to tests/ui/sync/track-caller-for-once-87707.rs diff --git a/tests/ui/track-diagnostics/track-caller-for-once-87707.run.stderr b/tests/ui/sync/track-caller-for-once-87707.run.stderr similarity index 100% rename from tests/ui/track-diagnostics/track-caller-for-once-87707.run.stderr rename to tests/ui/sync/track-caller-for-once-87707.run.stderr diff --git a/tests/ui/issues/issue-70673.rs b/tests/ui/thread-local/thread-local-static-reference-70673.rs similarity index 100% rename from tests/ui/issues/issue-70673.rs rename to tests/ui/thread-local/thread-local-static-reference-70673.rs diff --git a/tests/ui/trait-bounds/relaxed-bounds-assumed-unsized-87199.rs b/tests/ui/trait-bounds/invalid-bound-modifier-87199.rs similarity index 100% rename from tests/ui/trait-bounds/relaxed-bounds-assumed-unsized-87199.rs rename to tests/ui/trait-bounds/invalid-bound-modifier-87199.rs diff --git a/tests/ui/trait-bounds/relaxed-bounds-assumed-unsized-87199.stderr b/tests/ui/trait-bounds/invalid-bound-modifier-87199.stderr similarity index 80% rename from tests/ui/trait-bounds/relaxed-bounds-assumed-unsized-87199.stderr rename to tests/ui/trait-bounds/invalid-bound-modifier-87199.stderr index 16223676c067e..692f2d469e656 100644 --- a/tests/ui/trait-bounds/relaxed-bounds-assumed-unsized-87199.stderr +++ b/tests/ui/trait-bounds/invalid-bound-modifier-87199.stderr @@ -1,23 +1,23 @@ error: bound modifier `?` can only be applied to `Sized` - --> $DIR/relaxed-bounds-assumed-unsized-87199.rs:9:11 + --> $DIR/invalid-bound-modifier-87199.rs:9:11 | LL | fn arg(_: T) {} | ^^^^^ error: bound modifier `?` can only be applied to `Sized` - --> $DIR/relaxed-bounds-assumed-unsized-87199.rs:11:15 + --> $DIR/invalid-bound-modifier-87199.rs:11:15 | LL | fn ref_arg(_: &T) {} | ^^^^^ error: bound modifier `?` can only be applied to `Sized` - --> $DIR/relaxed-bounds-assumed-unsized-87199.rs:13:40 + --> $DIR/invalid-bound-modifier-87199.rs:13:40 | LL | fn ret() -> impl Iterator + ?Send { std::iter::empty() } | ^^^^^ error: bound modifier `?` can only be applied to `Sized` - --> $DIR/relaxed-bounds-assumed-unsized-87199.rs:13:40 + --> $DIR/invalid-bound-modifier-87199.rs:13:40 | LL | fn ret() -> impl Iterator + ?Send { std::iter::empty() } | ^^^^^ @@ -25,14 +25,14 @@ LL | fn ret() -> impl Iterator + ?Send { std::iter::empty() } = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0277]: the size for values of type `[i32]` cannot be known at compilation time - --> $DIR/relaxed-bounds-assumed-unsized-87199.rs:20:15 + --> $DIR/invalid-bound-modifier-87199.rs:20:15 | LL | ref_arg::<[i32]>(&[5]); | ^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[i32]` note: required by an implicit `Sized` bound in `ref_arg` - --> $DIR/relaxed-bounds-assumed-unsized-87199.rs:11:12 + --> $DIR/invalid-bound-modifier-87199.rs:11:12 | LL | fn ref_arg(_: &T) {} | ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg` diff --git a/tests/ui/issues/issue-69455.rs b/tests/ui/trait-bounds/projection-predicate-not-satisfied-69455.rs similarity index 100% rename from tests/ui/issues/issue-69455.rs rename to tests/ui/trait-bounds/projection-predicate-not-satisfied-69455.rs diff --git a/tests/ui/issues/issue-69455.stderr b/tests/ui/trait-bounds/projection-predicate-not-satisfied-69455.stderr similarity index 88% rename from tests/ui/issues/issue-69455.stderr rename to tests/ui/trait-bounds/projection-predicate-not-satisfied-69455.stderr index d3e307fba2ce9..48b3ba7061be3 100644 --- a/tests/ui/issues/issue-69455.stderr +++ b/tests/ui/trait-bounds/projection-predicate-not-satisfied-69455.stderr @@ -1,5 +1,5 @@ error[E0284]: type annotations needed - --> $DIR/issue-69455.rs:29:41 + --> $DIR/projection-predicate-not-satisfied-69455.rs:29:41 | LL | println!("{}", 23u64.test(xs.iter().sum())); | ---- ^^^ cannot infer type of the type parameter `S` declared on the method `sum` @@ -13,7 +13,7 @@ LL | println!("{}", 23u64.test(xs.iter().sum::())); | +++++ error[E0283]: type annotations needed - --> $DIR/issue-69455.rs:29:41 + --> $DIR/projection-predicate-not-satisfied-69455.rs:29:41 | LL | println!("{}", 23u64.test(xs.iter().sum())); | ---- ^^^ cannot infer type of the type parameter `S` declared on the method `sum` @@ -21,7 +21,7 @@ LL | println!("{}", 23u64.test(xs.iter().sum())); | required by a bound introduced by this call | note: multiple `impl`s satisfying `u64: Test<_>` found - --> $DIR/issue-69455.rs:11:1 + --> $DIR/projection-predicate-not-satisfied-69455.rs:11:1 | LL | impl Test for u64 { | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/issues/issue-73229.rs b/tests/ui/traits/callback-trait-implementation-73229.rs similarity index 90% rename from tests/ui/issues/issue-73229.rs rename to tests/ui/traits/callback-trait-implementation-73229.rs index 6d5eec2365e5e..56bcf7acdcdf5 100644 --- a/tests/ui/issues/issue-73229.rs +++ b/tests/ui/traits/callback-trait-implementation-73229.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/73229 //@ check-pass fn any() -> T { diff --git a/tests/ui/generics/duplicate-generic-parameter-error-86756.rs b/tests/ui/traits/duplicate-generic-parameter-error-86756.rs similarity index 100% rename from tests/ui/generics/duplicate-generic-parameter-error-86756.rs rename to tests/ui/traits/duplicate-generic-parameter-error-86756.rs diff --git a/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr b/tests/ui/traits/duplicate-generic-parameter-error-86756.stderr similarity index 100% rename from tests/ui/generics/duplicate-generic-parameter-error-86756.stderr rename to tests/ui/traits/duplicate-generic-parameter-error-86756.stderr diff --git a/tests/ui/issues/issue-69602-type-err-during-codegen-ice.rs b/tests/ui/traits/trait-implementation-ambiguity-69602.rs similarity index 88% rename from tests/ui/issues/issue-69602-type-err-during-codegen-ice.rs rename to tests/ui/traits/trait-implementation-ambiguity-69602.rs index 2c5257ce063cb..74198b97fd80b 100644 --- a/tests/ui/issues/issue-69602-type-err-during-codegen-ice.rs +++ b/tests/ui/traits/trait-implementation-ambiguity-69602.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/69602 trait TraitA { const VALUE: usize; } diff --git a/tests/ui/issues/issue-69602-type-err-during-codegen-ice.stderr b/tests/ui/traits/trait-implementation-ambiguity-69602.stderr similarity index 81% rename from tests/ui/issues/issue-69602-type-err-during-codegen-ice.stderr rename to tests/ui/traits/trait-implementation-ambiguity-69602.stderr index fa1d7dffbd49a..c771740bec415 100644 --- a/tests/ui/issues/issue-69602-type-err-during-codegen-ice.stderr +++ b/tests/ui/traits/trait-implementation-ambiguity-69602.stderr @@ -1,11 +1,11 @@ error[E0437]: type `M` is not a member of trait `TraitB` - --> $DIR/issue-69602-type-err-during-codegen-ice.rs:17:5 + --> $DIR/trait-implementation-ambiguity-69602.rs:18:5 | LL | type M = A; | ^^^^^^^^^^^^^ not a member of trait `TraitB` error[E0046]: not all trait items implemented, missing: `MyA` - --> $DIR/issue-69602-type-err-during-codegen-ice.rs:16:1 + --> $DIR/trait-implementation-ambiguity-69602.rs:17:1 | LL | type MyA: TraitA; | ---------------- `MyA` from trait diff --git a/tests/ui/issues/issue-69683.rs b/tests/ui/typeck/type-inference-for-associated-types-69683.rs similarity index 91% rename from tests/ui/issues/issue-69683.rs rename to tests/ui/typeck/type-inference-for-associated-types-69683.rs index 7a76e9ef205ff..f18adcae23b05 100644 --- a/tests/ui/issues/issue-69683.rs +++ b/tests/ui/typeck/type-inference-for-associated-types-69683.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/69683 pub trait Element { type Array; } diff --git a/tests/ui/issues/issue-69683.stderr b/tests/ui/typeck/type-inference-for-associated-types-69683.stderr similarity index 82% rename from tests/ui/issues/issue-69683.stderr rename to tests/ui/typeck/type-inference-for-associated-types-69683.stderr index b8e9e89e56eb9..5d49d442c55d0 100644 --- a/tests/ui/issues/issue-69683.stderr +++ b/tests/ui/typeck/type-inference-for-associated-types-69683.stderr @@ -1,5 +1,5 @@ error[E0284]: type annotations needed - --> $DIR/issue-69683.rs:30:10 + --> $DIR/type-inference-for-associated-types-69683.rs:31:10 | LL | 0u16.foo(b); | ^^^ @@ -12,13 +12,13 @@ LL + >::foo(0u16, b); | error[E0283]: type annotations needed - --> $DIR/issue-69683.rs:30:10 + --> $DIR/type-inference-for-associated-types-69683.rs:31:10 | LL | 0u16.foo(b); | ^^^ | note: multiple `impl`s satisfying `u8: Element<_>` found - --> $DIR/issue-69683.rs:5:1 + --> $DIR/type-inference-for-associated-types-69683.rs:6:1 | LL | impl Element<()> for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -26,7 +26,7 @@ LL | impl Element<()> for T { LL | impl, S> Element<[S; 3]> for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `Foo::foo` - --> $DIR/issue-69683.rs:15:9 + --> $DIR/type-inference-for-associated-types-69683.rs:16:9 | LL | u8: Element, | ^^^^^^^^^^ required by this bound in `Foo::foo` diff --git a/tests/ui/issues/issue-70746.rs b/tests/ui/unboxed-closures/callback-trait-prediction-70746.rs similarity index 91% rename from tests/ui/issues/issue-70746.rs rename to tests/ui/unboxed-closures/callback-trait-prediction-70746.rs index e7b4855039796..c0f0eb541e843 100644 --- a/tests/ui/issues/issue-70746.rs +++ b/tests/ui/unboxed-closures/callback-trait-prediction-70746.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/70746 //@ check-pass pub trait Trait1 { diff --git a/tests/ui/thir-print/break-outside-loop-error-83048.rs b/tests/ui/unpretty/thir-tree-break-outside-loop-83048.rs similarity index 100% rename from tests/ui/thir-print/break-outside-loop-error-83048.rs rename to tests/ui/unpretty/thir-tree-break-outside-loop-83048.rs diff --git a/tests/ui/thir-print/break-outside-loop-error-83048.stderr b/tests/ui/unpretty/thir-tree-break-outside-loop-83048.stderr similarity index 82% rename from tests/ui/thir-print/break-outside-loop-error-83048.stderr rename to tests/ui/unpretty/thir-tree-break-outside-loop-83048.stderr index 65a08e62e3df6..72ae6ae2725cc 100644 --- a/tests/ui/thir-print/break-outside-loop-error-83048.stderr +++ b/tests/ui/unpretty/thir-tree-break-outside-loop-83048.stderr @@ -1,5 +1,5 @@ error[E0268]: `break` outside of a loop or labeled block - --> $DIR/break-outside-loop-error-83048.rs:5:5 + --> $DIR/thir-tree-break-outside-loop-83048.rs:5:5 | LL | break; | ^^^^^ cannot `break` outside of a loop or labeled block