diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 84aa19aedeb..63f8a7293d8 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -2248,13 +2248,18 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { "...", ); if let Some(infer::RelateParamBound(_, t)) = origin { + let return_impl_trait = self + .in_progress_typeck_results + .map(|typeck_results| typeck_results.borrow().hir_owner) + .and_then(|owner| self.tcx.return_type_impl_trait(owner)) + .is_some(); let t = self.resolve_vars_if_possible(t); match t.kind() { // We've got: // fn get_later(g: G, dest: &mut T) -> impl FnOnce() + '_ // suggest: // fn get_later<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a - ty::Closure(_, _substs) | ty::Opaque(_, _substs) => { + ty::Closure(_, _substs) | ty::Opaque(_, _substs) if return_impl_trait => { new_binding_suggestion(&mut err, type_param_span, bound_kind); } _ => { diff --git a/compiler/rustc_typeck/src/check/upvar.rs b/compiler/rustc_typeck/src/check/upvar.rs index 75cad9f21c9..c666cd774c4 100644 --- a/compiler/rustc_typeck/src/check/upvar.rs +++ b/compiler/rustc_typeck/src/check/upvar.rs @@ -260,8 +260,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // local crate or were inlined into it along with some function. // This may change if abstract return types of some sort are // implemented. - let tcx = self.tcx; - self.typeck_results .borrow() .closure_min_captures_flattened(closure_id) @@ -276,7 +274,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { match capture { ty::UpvarCapture::ByValue(_) => upvar_ty, - ty::UpvarCapture::ByRef(borrow) => tcx.mk_ref( + ty::UpvarCapture::ByRef(borrow) => self.tcx.mk_ref( borrow.region, ty::TypeAndMut { ty: upvar_ty, mutbl: borrow.kind.to_mutbl_lossy() }, ), diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index f67f5fc533b..dac4acc4692 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -1652,6 +1652,16 @@ impl From for Rc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From<&[T]> for Rc<[T]> { + /// Allocate a reference-counted slice and fill it by cloning `v`'s items. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let original: &[i32] = &[1, 2, 3]; + /// let shared: Rc<[i32]> = Rc::from(original); + /// assert_eq!(&[1, 2, 3], &shared[..]); + /// ``` #[inline] fn from(v: &[T]) -> Rc<[T]> { >::from_slice(v) @@ -1660,6 +1670,15 @@ impl From<&[T]> for Rc<[T]> { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From<&str> for Rc { + /// Allocate a reference-counted string slice and copy `v` into it. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let shared: Rc = Rc::from("statue"); + /// assert_eq!("statue", &shared[..]); + /// ``` #[inline] fn from(v: &str) -> Rc { let rc = Rc::<[u8]>::from(v.as_bytes()); @@ -1669,6 +1688,16 @@ impl From<&str> for Rc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From for Rc { + /// Allocate a reference-counted string slice and copy `v` into it. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let original: String = "statue".to_owned(); + /// let shared: Rc = Rc::from(original); + /// assert_eq!("statue", &shared[..]); + /// ``` #[inline] fn from(v: String) -> Rc { Rc::from(&v[..]) @@ -1677,6 +1706,16 @@ impl From for Rc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From> for Rc { + /// Move a boxed object to a new, reference counted, allocation. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let original: Box = Box::new(1); + /// let shared: Rc = Rc::from(original); + /// assert_eq!(1, *shared); + /// ``` #[inline] fn from(v: Box) -> Rc { Rc::from_box(v) @@ -1685,6 +1724,16 @@ impl From> for Rc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From> for Rc<[T]> { + /// Allocate a reference-counted slice and move `v`'s items into it. + /// + /// # Example + /// + /// ``` + /// # use std::rc::Rc; + /// let original: Box> = Box::new(vec![1, 2, 3]); + /// let shared: Rc> = Rc::from(original); + /// assert_eq!(vec![1, 2, 3], *shared); + /// ``` #[inline] fn from(mut v: Vec) -> Rc<[T]> { unsafe { diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 461ca85c030..aeae888dddc 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -2285,6 +2285,16 @@ impl From for Arc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From<&[T]> for Arc<[T]> { + /// Allocate a reference-counted slice and fill it by cloning `v`'s items. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let original: &[i32] = &[1, 2, 3]; + /// let shared: Arc<[i32]> = Arc::from(original); + /// assert_eq!(&[1, 2, 3], &shared[..]); + /// ``` #[inline] fn from(v: &[T]) -> Arc<[T]> { >::from_slice(v) @@ -2293,6 +2303,15 @@ impl From<&[T]> for Arc<[T]> { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From<&str> for Arc { + /// Allocate a reference-counted `str` and copy `v` into it. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let shared: Arc = Arc::from("eggplant"); + /// assert_eq!("eggplant", &shared[..]); + /// ``` #[inline] fn from(v: &str) -> Arc { let arc = Arc::<[u8]>::from(v.as_bytes()); @@ -2302,6 +2321,16 @@ impl From<&str> for Arc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From for Arc { + /// Allocate a reference-counted `str` and copy `v` into it. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let unique: String = "eggplant".to_owned(); + /// let shared: Arc = Arc::from(unique); + /// assert_eq!("eggplant", &shared[..]); + /// ``` #[inline] fn from(v: String) -> Arc { Arc::from(&v[..]) @@ -2310,6 +2339,16 @@ impl From for Arc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From> for Arc { + /// Move a boxed object to a new, reference-counted allocation. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let unique: Box = Box::from("eggplant"); + /// let shared: Arc = Arc::from(unique); + /// assert_eq!("eggplant", &shared[..]); + /// ``` #[inline] fn from(v: Box) -> Arc { Arc::from_box(v) @@ -2318,6 +2357,16 @@ impl From> for Arc { #[stable(feature = "shared_from_slice", since = "1.21.0")] impl From> for Arc<[T]> { + /// Allocate a reference-counted slice and move `v`'s items into it. + /// + /// # Example + /// + /// ``` + /// # use std::sync::Arc; + /// let unique: Vec = vec![1, 2, 3]; + /// let shared: Arc<[i32]> = Arc::from(unique); + /// assert_eq!(&[1, 2, 3], &shared[..]); + /// ``` #[inline] fn from(mut v: Vec) -> Arc<[T]> { unsafe { diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index b40c1a8c57a..b6166617789 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1385,13 +1385,14 @@ impl Vec { /// assert_eq!(vec, [2, 4]); /// ``` /// - /// The exact order may be useful for tracking external state, like an index. + /// Because the elements are visited exactly once in the original order, + /// external state may be used to decide which elements to keep. /// /// ``` /// let mut vec = vec![1, 2, 3, 4, 5]; /// let keep = [false, true, true, false, true]; - /// let mut i = 0; - /// vec.retain(|_| (keep[i], i += 1).0); + /// let mut iter = keep.iter(); + /// vec.retain(|_| *iter.next().unwrap()); /// assert_eq!(vec, [2, 3, 5]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index e3d74791dcf..2969da58d42 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -609,6 +609,17 @@ fn test_move_items_zero_sized() { assert_eq!(vec2, [(), (), ()]); } +#[test] +fn test_drain_empty_vec() { + let mut vec: Vec = vec![]; + let mut vec2: Vec = vec![]; + for i in vec.drain(..) { + vec2.push(i); + } + assert!(vec.is_empty()); + assert!(vec2.is_empty()); +} + #[test] fn test_drain_items() { let mut vec = vec![1, 2, 3]; diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index a0ab6ed4a4c..7e7e417bb65 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2161,18 +2161,20 @@ fn clean_use_statement( return Vec::new(); } - let (doc_meta_item, please_inline) = import.attrs.lists(sym::doc).get_word_attr(sym::inline); + let inline_attr = import.attrs.lists(sym::doc).get_word_attr(sym::inline); let pub_underscore = import.vis.node.is_pub() && name == kw::Underscore; - if pub_underscore && please_inline { - rustc_errors::struct_span_err!( - cx.tcx.sess, - doc_meta_item.unwrap().span(), - E0780, - "anonymous imports cannot be inlined" - ) - .span_label(import.span, "anonymous import") - .emit(); + if pub_underscore { + if let Some(ref inline) = inline_attr { + rustc_errors::struct_span_err!( + cx.tcx.sess, + inline.span(), + E0780, + "anonymous imports cannot be inlined" + ) + .span_label(import.span, "anonymous import") + .emit(); + } } // We consider inlining the documentation of `pub use` statements, but we @@ -2205,7 +2207,7 @@ fn clean_use_statement( } Import::new_glob(resolve_use_source(cx, path), true) } else { - if !please_inline { + if inline_attr.is_none() { if let Res::Def(DefKind::Mod, did) = path.res { if !did.is_local() && did.index == CRATE_DEF_INDEX { // if we're `pub use`ing an extern crate root, don't inline it unless we diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 9b8e04a1d23..e1ccbfd9da9 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -438,7 +438,7 @@ impl AttributesExt for [ast::Attribute] { crate trait NestedAttributesExt { /// Returns `true` if the attribute list contains a specific `Word` fn has_word(self, word: Symbol) -> bool; - fn get_word_attr(self, word: Symbol) -> (Option, bool); + fn get_word_attr(self, word: Symbol) -> Option; } impl + IntoIterator> @@ -448,11 +448,8 @@ impl + IntoIterator (Option, bool) { - match self.find(|attr| attr.is_word() && attr.has_name(word)) { - Some(a) => (Some(a), true), - None => (None, false), - } + fn get_word_attr(mut self, word: Symbol) -> Option { + self.find(|attr| attr.is_word() && attr.has_name(word)) } } diff --git a/src/test/rustdoc/ensure-src-link.rs b/src/test/rustdoc/ensure-src-link.rs new file mode 100644 index 00000000000..b7e7b11d27a --- /dev/null +++ b/src/test/rustdoc/ensure-src-link.rs @@ -0,0 +1,6 @@ +#![crate_name = "foo"] + +// This test ensures that the [src] link is present on traits items. + +// @has foo/trait.Iterator.html '//h3[@id="method.zip"]/a[@class="srclink"]' "[src]" +pub use std::iter::Iterator; diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr new file mode 100644 index 00000000000..b359826cb4a --- /dev/null +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr @@ -0,0 +1,17 @@ +error[E0311]: the parameter type `T` may not live long enough + --> $DIR/missing-lifetimes-in-signature-2.rs:20:5 + | +LL | / foo.bar(move |_| { +LL | | +LL | | t.test(); +LL | | }); + | |______^ + | +note: the parameter type `T` must be valid for the anonymous lifetime #2 defined on the function body at 19:1... + --> $DIR/missing-lifetimes-in-signature-2.rs:19:1 + | +LL | fn func(foo: &Foo, t: T) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs new file mode 100644 index 00000000000..c6802ac6cc7 --- /dev/null +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs @@ -0,0 +1,26 @@ +// Regression test for #81650 + +struct Foo<'a> { + x: &'a mut &'a i32, +} + +impl<'a> Foo<'a> { + fn bar(&self, f: F) + where + F: FnOnce(&Foo<'a>) -> T, + F: 'a, + {} +} + +trait Test { + fn test(&self); +} + +fn func(foo: &Foo, t: T) { + foo.bar(move |_| { + //~^ ERROR the parameter type `T` may not live long enough + t.test(); + }); +} + +fn main() {} diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr new file mode 100644 index 00000000000..c7def9b668d --- /dev/null +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr @@ -0,0 +1,21 @@ +error[E0311]: the parameter type `T` may not live long enough + --> $DIR/missing-lifetimes-in-signature-2.rs:20:9 + | +LL | fn func(foo: &Foo, t: T) { + | -- help: consider adding an explicit lifetime bound...: `T: 'a +` +LL | foo.bar(move |_| { + | ^^^ + | +note: the parameter type `T` must be valid for the anonymous lifetime #2 defined on the function body at 19:1... + --> $DIR/missing-lifetimes-in-signature-2.rs:19:1 + | +LL | fn func(foo: &Foo, t: T) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: ...so that the type `[closure@$DIR/missing-lifetimes-in-signature-2.rs:20:13: 23:6]` will meet its required lifetime bounds + --> $DIR/missing-lifetimes-in-signature-2.rs:20:9 + | +LL | foo.bar(move |_| { + | ^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/traits/trait-alias-ambiguous.rs b/src/test/ui/traits/alias/ambiguous.rs similarity index 100% rename from src/test/ui/traits/trait-alias-ambiguous.rs rename to src/test/ui/traits/alias/ambiguous.rs diff --git a/src/test/ui/traits/trait-alias-ambiguous.stderr b/src/test/ui/traits/alias/ambiguous.stderr similarity index 85% rename from src/test/ui/traits/trait-alias-ambiguous.stderr rename to src/test/ui/traits/alias/ambiguous.stderr index f692e92d861..649ce72604e 100644 --- a/src/test/ui/traits/trait-alias-ambiguous.stderr +++ b/src/test/ui/traits/alias/ambiguous.stderr @@ -1,16 +1,16 @@ error[E0034]: multiple applicable items in scope - --> $DIR/trait-alias-ambiguous.rs:21:7 + --> $DIR/ambiguous.rs:21:7 | LL | t.foo(); | ^^^ multiple `foo` found | note: candidate #1 is defined in an impl of the trait `A` for the type `u8` - --> $DIR/trait-alias-ambiguous.rs:8:9 + --> $DIR/ambiguous.rs:8:9 | LL | fn foo(&self) {} | ^^^^^^^^^^^^^ note: candidate #2 is defined in an impl of the trait `B` for the type `u8` - --> $DIR/trait-alias-ambiguous.rs:11:9 + --> $DIR/ambiguous.rs:11:9 | LL | fn foo(&self) {} | ^^^^^^^^^^^^^ diff --git a/src/test/ui/traits/auxiliary/trait_alias.rs b/src/test/ui/traits/alias/auxiliary/greeter.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_alias.rs rename to src/test/ui/traits/alias/auxiliary/greeter.rs diff --git a/src/test/ui/traits/trait-alias/auxiliary/trait_alias.rs b/src/test/ui/traits/alias/auxiliary/send_sync.rs similarity index 100% rename from src/test/ui/traits/trait-alias/auxiliary/trait_alias.rs rename to src/test/ui/traits/alias/auxiliary/send_sync.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias.rs b/src/test/ui/traits/alias/basic.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias.rs rename to src/test/ui/traits/alias/basic.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-bounds.rs b/src/test/ui/traits/alias/bounds.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-bounds.rs rename to src/test/ui/traits/alias/bounds.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs b/src/test/ui/traits/alias/cross-crate.rs similarity index 78% rename from src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs rename to src/test/ui/traits/alias/cross-crate.rs index 14edfdd7a3d..8919c643400 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs +++ b/src/test/ui/traits/alias/cross-crate.rs @@ -1,11 +1,11 @@ -// aux-build:trait_alias.rs +// aux-build:send_sync.rs #![feature(trait_alias)] -extern crate trait_alias; +extern crate send_sync; use std::rc::Rc; -use trait_alias::SendSync; +use send_sync::SendSync; fn use_alias() {} diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr b/src/test/ui/traits/alias/cross-crate.stderr similarity index 90% rename from src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr rename to src/test/ui/traits/alias/cross-crate.stderr index 60a4a46a055..3b8fee8e8df 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr +++ b/src/test/ui/traits/alias/cross-crate.stderr @@ -1,5 +1,5 @@ error[E0277]: `Rc` cannot be sent between threads safely - --> $DIR/trait-alias-cross-crate.rs:14:17 + --> $DIR/cross-crate.rs:14:17 | LL | fn use_alias() {} | -------- required by this bound in `use_alias` @@ -10,7 +10,7 @@ LL | use_alias::>(); = help: the trait `Send` is not implemented for `Rc` error[E0277]: `Rc` cannot be shared between threads safely - --> $DIR/trait-alias-cross-crate.rs:14:17 + --> $DIR/cross-crate.rs:14:17 | LL | fn use_alias() {} | -------- required by this bound in `use_alias` diff --git a/src/test/ui/traits/trait-alias/trait-alias-impl.rs b/src/test/ui/traits/alias/impl.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-impl.rs rename to src/test/ui/traits/alias/impl.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-impl.stderr b/src/test/ui/traits/alias/impl.stderr similarity index 87% rename from src/test/ui/traits/trait-alias/trait-alias-impl.stderr rename to src/test/ui/traits/alias/impl.stderr index 301db4fb71c..cedcd10213d 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-impl.stderr +++ b/src/test/ui/traits/alias/impl.stderr @@ -1,5 +1,5 @@ error[E0404]: expected trait, found trait alias `DefaultAlias` - --> $DIR/trait-alias-impl.rs:5:6 + --> $DIR/impl.rs:5:6 | LL | impl DefaultAlias for () {} | ^^^^^^^^^^^^ not a trait diff --git a/src/test/ui/traits/trait-alias-import-cross-crate.rs b/src/test/ui/traits/alias/import-cross-crate.rs similarity index 66% rename from src/test/ui/traits/trait-alias-import-cross-crate.rs rename to src/test/ui/traits/alias/import-cross-crate.rs index 975542ab49b..868585cd097 100644 --- a/src/test/ui/traits/trait-alias-import-cross-crate.rs +++ b/src/test/ui/traits/alias/import-cross-crate.rs @@ -1,12 +1,12 @@ // run-pass -// aux-build:trait_alias.rs +// aux-build:greeter.rs #![feature(trait_alias)] -extern crate trait_alias; +extern crate greeter; // Import only the alias, not the real trait. -use trait_alias::{Greet, Hi}; +use greeter::{Greet, Hi}; fn main() { let hi = Hi; diff --git a/src/test/ui/traits/trait-alias-import.rs b/src/test/ui/traits/alias/import.rs similarity index 100% rename from src/test/ui/traits/trait-alias-import.rs rename to src/test/ui/traits/alias/import.rs diff --git a/src/test/ui/traits/trait-alias/issue-60021-assoc-method-resolve.rs b/src/test/ui/traits/alias/issue-60021-assoc-method-resolve.rs similarity index 100% rename from src/test/ui/traits/trait-alias/issue-60021-assoc-method-resolve.rs rename to src/test/ui/traits/alias/issue-60021-assoc-method-resolve.rs diff --git a/src/test/ui/traits/trait-alias/issue-72415-assoc-const-resolve.rs b/src/test/ui/traits/alias/issue-72415-assoc-const-resolve.rs similarity index 100% rename from src/test/ui/traits/trait-alias/issue-72415-assoc-const-resolve.rs rename to src/test/ui/traits/alias/issue-72415-assoc-const-resolve.rs diff --git a/src/test/ui/traits/trait-alias/issue-75983.rs b/src/test/ui/traits/alias/issue-75983.rs similarity index 100% rename from src/test/ui/traits/trait-alias/issue-75983.rs rename to src/test/ui/traits/alias/issue-75983.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs b/src/test/ui/traits/alias/maybe-bound.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs rename to src/test/ui/traits/alias/maybe-bound.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs b/src/test/ui/traits/alias/no-duplicates.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs rename to src/test/ui/traits/alias/no-duplicates.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr b/src/test/ui/traits/alias/no-duplicates.stderr similarity index 95% rename from src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr rename to src/test/ui/traits/alias/no-duplicates.stderr index b297d54375c..9f38dd40c3a 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr +++ b/src/test/ui/traits/alias/no-duplicates.stderr @@ -1,5 +1,5 @@ error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:16:22 + --> $DIR/no-duplicates.rs:16:22 | LL | trait _0 = Obj; | --- @@ -16,7 +16,7 @@ LL | type _T00 = dyn _0 + _0; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:19:22 + --> $DIR/no-duplicates.rs:19:22 | LL | trait _0 = Obj; | --- @@ -35,7 +35,7 @@ LL | type _T01 = dyn _1 + _0; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:22:22 + --> $DIR/no-duplicates.rs:22:22 | LL | trait _0 = Obj; | --- @@ -57,7 +57,7 @@ LL | type _T02 = dyn _1 + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:25:23 + --> $DIR/no-duplicates.rs:25:23 | LL | trait _0 = Obj; | --- additional non-auto trait @@ -73,7 +73,7 @@ LL | type _T03 = dyn Obj + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:28:22 + --> $DIR/no-duplicates.rs:28:22 | LL | trait _0 = Obj; | --- first non-auto trait @@ -89,7 +89,7 @@ LL | type _T04 = dyn _1 + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:37:17 + --> $DIR/no-duplicates.rs:37:17 | LL | trait _0 = Obj; | --- @@ -114,7 +114,7 @@ LL | type _T10 = dyn _2 + _3; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:40:22 + --> $DIR/no-duplicates.rs:40:22 | LL | trait _0 = Obj; | --- additional non-auto trait @@ -133,7 +133,7 @@ LL | type _T11 = dyn _3 + _2; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:43:23 + --> $DIR/no-duplicates.rs:43:23 | LL | trait _0 = Obj; | --- additional non-auto trait @@ -150,7 +150,7 @@ LL | type _T12 = dyn Obj + _2; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:46:17 + --> $DIR/no-duplicates.rs:46:17 | LL | trait _0 = Obj; | --- @@ -175,7 +175,7 @@ LL | type _T13 = dyn _2 + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:49:22 + --> $DIR/no-duplicates.rs:49:22 | LL | trait _0 = Obj; | --- first non-auto trait @@ -194,7 +194,7 @@ LL | type _T14 = dyn _1 + _3; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:52:22 + --> $DIR/no-duplicates.rs:52:22 | LL | trait _0 = Obj; | --- additional non-auto trait @@ -213,7 +213,7 @@ LL | type _T15 = dyn _3 + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:55:22 + --> $DIR/no-duplicates.rs:55:22 | LL | trait _0 = Obj; | --- first non-auto trait @@ -234,7 +234,7 @@ LL | type _T16 = dyn _1 + _4; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:58:22 + --> $DIR/no-duplicates.rs:58:22 | LL | trait _0 = Obj; | --- additional non-auto trait @@ -255,7 +255,7 @@ LL | type _T17 = dyn _4 + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:65:22 + --> $DIR/no-duplicates.rs:65:22 | LL | trait _5 = Obj + Send; | --- @@ -272,7 +272,7 @@ LL | type _T20 = dyn _5 + _5; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:68:23 + --> $DIR/no-duplicates.rs:68:23 | LL | trait _5 = Obj + Send; | --- additional non-auto trait @@ -286,7 +286,7 @@ LL | type _T21 = dyn Obj + _5; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:71:22 + --> $DIR/no-duplicates.rs:71:22 | LL | trait _5 = Obj + Send; | --- first non-auto trait @@ -300,7 +300,7 @@ LL | type _T22 = dyn _5 + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:74:36 + --> $DIR/no-duplicates.rs:74:36 | LL | trait _5 = Obj + Send; | --- first non-auto trait @@ -314,7 +314,7 @@ LL | type _T23 = dyn _5 + Send + Sync + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:81:17 + --> $DIR/no-duplicates.rs:81:17 | LL | trait _5 = Obj + Send; | --- @@ -337,7 +337,7 @@ LL | type _T30 = dyn _6; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:84:17 + --> $DIR/no-duplicates.rs:84:17 | LL | trait _5 = Obj + Send; | --- @@ -360,7 +360,7 @@ LL | type _T31 = dyn _6 + Send; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:87:24 + --> $DIR/no-duplicates.rs:87:24 | LL | trait _5 = Obj + Send; | --- @@ -383,7 +383,7 @@ LL | type _T32 = dyn Send + _6; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:95:22 + --> $DIR/no-duplicates.rs:95:22 | LL | trait _5 = Obj + Send; | --- first non-auto trait @@ -402,7 +402,7 @@ LL | type _T40 = dyn _8 + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:98:23 + --> $DIR/no-duplicates.rs:98:23 | LL | trait _5 = Obj + Send; | --- additional non-auto trait @@ -421,7 +421,7 @@ LL | type _T41 = dyn Obj + _8; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:101:22 + --> $DIR/no-duplicates.rs:101:22 | LL | trait _3 = Obj; | --- additional non-auto trait @@ -445,7 +445,7 @@ LL | type _T42 = dyn _8 + _4; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:104:22 + --> $DIR/no-duplicates.rs:104:22 | LL | trait _3 = Obj; | --- first non-auto trait @@ -469,7 +469,7 @@ LL | type _T43 = dyn _4 + _8; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:107:36 + --> $DIR/no-duplicates.rs:107:36 | LL | trait _3 = Obj; | --- first non-auto trait @@ -493,7 +493,7 @@ LL | type _T44 = dyn _4 + Send + Sync + _8; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:117:22 + --> $DIR/no-duplicates.rs:117:22 | LL | trait _9 = for<'a> ObjL<'a>; | ---------------- first non-auto trait @@ -508,7 +508,7 @@ LL | type _T50 = dyn _9 + _10; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-duplicates.rs:123:23 + --> $DIR/no-duplicates.rs:123:23 | LL | trait _11 = ObjT fn(&'a u8)>; | ------------------------ first non-auto trait diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.rs b/src/test/ui/traits/alias/no-extra-traits.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.rs rename to src/test/ui/traits/alias/no-extra-traits.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr b/src/test/ui/traits/alias/no-extra-traits.stderr similarity index 95% rename from src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr rename to src/test/ui/traits/alias/no-extra-traits.stderr index 1d7b3fa112b..cdb5cd90b85 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr +++ b/src/test/ui/traits/alias/no-extra-traits.stderr @@ -1,5 +1,5 @@ error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:16:22 + --> $DIR/no-extra-traits.rs:16:22 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -13,7 +13,7 @@ LL | type _T00 = dyn _0 + ObjB; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:19:24 + --> $DIR/no-extra-traits.rs:19:24 | LL | trait _0 = ObjA; | ---- additional non-auto trait @@ -27,7 +27,7 @@ LL | type _T01 = dyn ObjB + _0; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:22:24 + --> $DIR/no-extra-traits.rs:22:24 | LL | trait _0 = ObjA; | ---- additional non-auto trait @@ -43,7 +43,7 @@ LL | type _T02 = dyn ObjB + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:25:22 + --> $DIR/no-extra-traits.rs:25:22 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -59,7 +59,7 @@ LL | type _T03 = dyn _1 + ObjB; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:34:22 + --> $DIR/no-extra-traits.rs:34:22 | LL | trait _2 = ObjB; | ---- @@ -78,7 +78,7 @@ LL | type _T10 = dyn _2 + _3; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:37:22 + --> $DIR/no-extra-traits.rs:37:22 | LL | trait _2 = ObjB; | ---- @@ -97,7 +97,7 @@ LL | type _T11 = dyn _3 + _2; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:40:22 + --> $DIR/no-extra-traits.rs:40:22 | LL | trait _2 = ObjB; | ---- @@ -118,7 +118,7 @@ LL | type _T12 = dyn _2 + _4; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:43:22 + --> $DIR/no-extra-traits.rs:43:22 | LL | trait _2 = ObjB; | ---- @@ -139,7 +139,7 @@ LL | type _T13 = dyn _4 + _2; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:50:22 + --> $DIR/no-extra-traits.rs:50:22 | LL | trait _0 = ObjA; | ---- additional non-auto trait @@ -158,7 +158,7 @@ LL | type _T20 = dyn _5 + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:53:22 + --> $DIR/no-extra-traits.rs:53:22 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -177,7 +177,7 @@ LL | type _T21 = dyn _1 + _5; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:56:22 + --> $DIR/no-extra-traits.rs:56:22 | LL | trait _5 = Sync + ObjB + Send; | ---- first non-auto trait @@ -191,7 +191,7 @@ LL | type _T22 = dyn _5 + ObjA; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:59:24 + --> $DIR/no-extra-traits.rs:59:24 | LL | trait _5 = Sync + ObjB + Send; | ---- additional non-auto trait @@ -205,7 +205,7 @@ LL | type _T23 = dyn ObjA + _5; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:62:29 + --> $DIR/no-extra-traits.rs:62:29 | LL | trait _0 = ObjA; | ---- additional non-auto trait @@ -224,7 +224,7 @@ LL | type _T24 = dyn Send + _5 + _1 + Sync; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:65:29 + --> $DIR/no-extra-traits.rs:65:29 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -243,7 +243,7 @@ LL | type _T25 = dyn _1 + Sync + _5 + Send; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:68:36 + --> $DIR/no-extra-traits.rs:68:36 | LL | trait _5 = Sync + ObjB + Send; | ---- first non-auto trait @@ -257,7 +257,7 @@ LL | type _T26 = dyn Sync + Send + _5 + ObjA; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:71:38 + --> $DIR/no-extra-traits.rs:71:38 | LL | trait _5 = Sync + ObjB + Send; | ---- additional non-auto trait @@ -271,7 +271,7 @@ LL | type _T27 = dyn Send + Sync + ObjA + _5; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:80:17 + --> $DIR/no-extra-traits.rs:80:17 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -296,7 +296,7 @@ LL | type _T30 = dyn _6; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:83:17 + --> $DIR/no-extra-traits.rs:83:17 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -321,7 +321,7 @@ LL | type _T31 = dyn _6 + Send; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:86:24 + --> $DIR/no-extra-traits.rs:86:24 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -346,7 +346,7 @@ LL | type _T32 = dyn Send + _6; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:89:17 + --> $DIR/no-extra-traits.rs:89:17 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -381,7 +381,7 @@ LL | type _T33 = dyn _8; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:92:17 + --> $DIR/no-extra-traits.rs:92:17 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -416,7 +416,7 @@ LL | type _T34 = dyn _8 + Send; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:95:24 + --> $DIR/no-extra-traits.rs:95:24 | LL | trait _0 = ObjA; | ---- first non-auto trait @@ -451,7 +451,7 @@ LL | type _T35 = dyn Send + _8; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:103:23 + --> $DIR/no-extra-traits.rs:103:23 | LL | trait _5 = Sync + ObjB + Send; | ---- first non-auto trait @@ -470,7 +470,7 @@ LL | type _T40 = dyn _10 + ObjA; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:106:24 + --> $DIR/no-extra-traits.rs:106:24 | LL | trait _5 = Sync + ObjB + Send; | ---- additional non-auto trait @@ -489,7 +489,7 @@ LL | type _T41 = dyn ObjA + _10; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:109:23 + --> $DIR/no-extra-traits.rs:109:23 | LL | trait _0 = ObjA; | ---- additional non-auto trait @@ -513,7 +513,7 @@ LL | type _T42 = dyn _10 + _1; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:112:37 + --> $DIR/no-extra-traits.rs:112:37 | LL | trait _5 = Sync + ObjB + Send; | ---- first non-auto trait @@ -532,7 +532,7 @@ LL | type _T43 = dyn Send + _10 + Sync + ObjA; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:115:24 + --> $DIR/no-extra-traits.rs:115:24 | LL | trait _5 = Sync + ObjB + Send; | ---- additional non-auto trait @@ -551,7 +551,7 @@ LL | type _T44 = dyn ObjA + _10 + Send + Sync; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/trait-alias-no-extra-traits.rs:118:37 + --> $DIR/no-extra-traits.rs:118:37 | LL | trait _0 = ObjA; | ---- additional non-auto trait diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs b/src/test/ui/traits/alias/object-fail.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-object-fail.rs rename to src/test/ui/traits/alias/object-fail.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr b/src/test/ui/traits/alias/object-fail.stderr similarity index 92% rename from src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr rename to src/test/ui/traits/alias/object-fail.stderr index 1118a75e085..325bc6d2808 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr +++ b/src/test/ui/traits/alias/object-fail.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Eq` cannot be made into an object - --> $DIR/trait-alias-object-fail.rs:7:13 + --> $DIR/object-fail.rs:7:13 | LL | let _: &dyn EqAlias = &123; | ^^^^^^^^^^^ `Eq` cannot be made into an object @@ -11,7 +11,7 @@ LL | pub trait Eq: PartialEq { | ^^^^^^^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified - --> $DIR/trait-alias-object-fail.rs:9:17 + --> $DIR/object-fail.rs:9:17 | LL | let _: &dyn IteratorAlias = &vec![123].into_iter(); | ^^^^^^^^^^^^^ help: specify the associated type: `IteratorAlias` diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-wf.rs b/src/test/ui/traits/alias/object-wf.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-object-wf.rs rename to src/test/ui/traits/alias/object-wf.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-object.rs b/src/test/ui/traits/alias/object.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-object.rs rename to src/test/ui/traits/alias/object.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.rs b/src/test/ui/traits/alias/only-maybe-bound.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.rs rename to src/test/ui/traits/alias/only-maybe-bound.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.stderr b/src/test/ui/traits/alias/only-maybe-bound.stderr similarity index 77% rename from src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.stderr rename to src/test/ui/traits/alias/only-maybe-bound.stderr index 594115d980c..99589edb535 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.stderr +++ b/src/test/ui/traits/alias/only-maybe-bound.stderr @@ -1,11 +1,11 @@ error[E0224]: at least one trait is required for an object type - --> $DIR/trait-alias-only-maybe-bound.rs:13:12 + --> $DIR/only-maybe-bound.rs:13:12 | LL | type _T0 = dyn _1; | ^^^^^^ error[E0224]: at least one trait is required for an object type - --> $DIR/trait-alias-only-maybe-bound.rs:19:12 + --> $DIR/only-maybe-bound.rs:19:12 | LL | type _T1 = dyn _2; | ^^^^^^ diff --git a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.rs b/src/test/ui/traits/alias/syntax-fail.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-syntax-fail.rs rename to src/test/ui/traits/alias/syntax-fail.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.stderr b/src/test/ui/traits/alias/syntax-fail.stderr similarity index 74% rename from src/test/ui/traits/trait-alias/trait-alias-syntax-fail.stderr rename to src/test/ui/traits/alias/syntax-fail.stderr index 18c22133bc7..748b92056d1 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.stderr +++ b/src/test/ui/traits/alias/syntax-fail.stderr @@ -1,23 +1,23 @@ error: trait aliases cannot be `auto` - --> $DIR/trait-alias-syntax-fail.rs:4:1 + --> $DIR/syntax-fail.rs:4:1 | LL | auto trait A = Foo; | ^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto` error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-syntax-fail.rs:5:1 + --> $DIR/syntax-fail.rs:5:1 | LL | unsafe trait B = Foo; | ^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: bounds are not allowed on trait aliases - --> $DIR/trait-alias-syntax-fail.rs:7:8 + --> $DIR/syntax-fail.rs:7:8 | LL | trait C: Ord = Eq; | ^^^^^ error: bounds are not allowed on trait aliases - --> $DIR/trait-alias-syntax-fail.rs:8:8 + --> $DIR/syntax-fail.rs:8:8 | LL | trait D: = Eq; | ^ diff --git a/src/test/ui/traits/trait-alias/trait-alias-syntax.rs b/src/test/ui/traits/alias/syntax.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-syntax.rs rename to src/test/ui/traits/alias/syntax.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-wf.rs b/src/test/ui/traits/alias/wf.rs similarity index 100% rename from src/test/ui/traits/trait-alias/trait-alias-wf.rs rename to src/test/ui/traits/alias/wf.rs diff --git a/src/test/ui/traits/trait-alias/trait-alias-wf.stderr b/src/test/ui/traits/alias/wf.stderr similarity index 92% rename from src/test/ui/traits/trait-alias/trait-alias-wf.stderr rename to src/test/ui/traits/alias/wf.stderr index e0df76381e0..b07145f4d38 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-wf.stderr +++ b/src/test/ui/traits/alias/wf.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Foo` is not satisfied - --> $DIR/trait-alias-wf.rs:5:14 + --> $DIR/wf.rs:5:14 | LL | trait A {} | --- required by this bound in `A` diff --git a/src/test/ui/traits/anon-trait-static-method.rs b/src/test/ui/traits/anon-static-method.rs similarity index 100% rename from src/test/ui/traits/anon-trait-static-method.rs rename to src/test/ui/traits/anon-static-method.rs diff --git a/src/test/ui/traits/trait-as-struct-constructor.rs b/src/test/ui/traits/as-struct-constructor.rs similarity index 100% rename from src/test/ui/traits/trait-as-struct-constructor.rs rename to src/test/ui/traits/as-struct-constructor.rs diff --git a/src/test/ui/traits/trait-as-struct-constructor.stderr b/src/test/ui/traits/as-struct-constructor.stderr similarity index 86% rename from src/test/ui/traits/trait-as-struct-constructor.stderr rename to src/test/ui/traits/as-struct-constructor.stderr index e1d54fbf8aa..d06e85f3a20 100644 --- a/src/test/ui/traits/trait-as-struct-constructor.stderr +++ b/src/test/ui/traits/as-struct-constructor.stderr @@ -1,5 +1,5 @@ error[E0574]: expected struct, variant or union type, found trait `TraitNotAStruct` - --> $DIR/trait-as-struct-constructor.rs:4:5 + --> $DIR/as-struct-constructor.rs:4:5 | LL | TraitNotAStruct{ value: 0 }; | ^^^^^^^^^^^^^^^ not a struct, variant or union type diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.rs b/src/test/ui/traits/assoc-type-in-superbad.rs similarity index 100% rename from src/test/ui/traits/traits-assoc-type-in-supertrait-bad.rs rename to src/test/ui/traits/assoc-type-in-superbad.rs diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr b/src/test/ui/traits/assoc-type-in-superbad.stderr similarity index 83% rename from src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr rename to src/test/ui/traits/assoc-type-in-superbad.stderr index 5ac7b08e52f..cbdb6b96f46 100644 --- a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr +++ b/src/test/ui/traits/assoc-type-in-superbad.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving ` as Iterator>::Item == u32` - --> $DIR/traits-assoc-type-in-supertrait-bad.rs:12:16 + --> $DIR/assoc-type-in-superbad.rs:12:16 | LL | type Key = u32; | ^^^ expected `i32`, found `u32` diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait.rs b/src/test/ui/traits/assoc-type-in-supertrait.rs similarity index 100% rename from src/test/ui/traits/traits-assoc-type-in-supertrait.rs rename to src/test/ui/traits/assoc-type-in-supertrait.rs diff --git a/src/test/ui/traits/assoc_type_bound_with_struct.rs b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs similarity index 100% rename from src/test/ui/traits/assoc_type_bound_with_struct.rs rename to src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs diff --git a/src/test/ui/traits/assoc_type_bound_with_struct.stderr b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr similarity index 100% rename from src/test/ui/traits/assoc_type_bound_with_struct.stderr rename to src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr diff --git a/src/test/ui/traits/check-trait-object-bounds-1.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-1.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-1.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-1.stderr rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr diff --git a/src/test/ui/traits/check-trait-object-bounds-2-ok.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-2-ok.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-2.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-2.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-2.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-2.stderr rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr diff --git a/src/test/ui/traits/check-trait-object-bounds-3.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-3.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-3.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-3.stderr rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr diff --git a/src/test/ui/traits/check-trait-object-bounds-4.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-4.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-4.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-4.stderr rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr diff --git a/src/test/ui/traits/check-trait-object-bounds-5.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-5.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-5.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-5.stderr rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr diff --git a/src/test/ui/traits/check-trait-object-bounds-6.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.rs similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-6.rs rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.rs diff --git a/src/test/ui/traits/check-trait-object-bounds-6.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr similarity index 100% rename from src/test/ui/traits/check-trait-object-bounds-6.stderr rename to src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr diff --git a/src/test/ui/traits/astconv-cycle-between-trait-and-type.rs b/src/test/ui/traits/astconv-cycle-between-and-type.rs similarity index 100% rename from src/test/ui/traits/astconv-cycle-between-trait-and-type.rs rename to src/test/ui/traits/astconv-cycle-between-and-type.rs diff --git a/src/test/ui/traits/auxiliary/crate_a1.rs b/src/test/ui/traits/bound/auxiliary/crate_a1.rs similarity index 100% rename from src/test/ui/traits/auxiliary/crate_a1.rs rename to src/test/ui/traits/bound/auxiliary/crate_a1.rs diff --git a/src/test/ui/traits/auxiliary/crate_a2.rs b/src/test/ui/traits/bound/auxiliary/crate_a2.rs similarity index 100% rename from src/test/ui/traits/auxiliary/crate_a2.rs rename to src/test/ui/traits/bound/auxiliary/crate_a2.rs diff --git a/src/test/ui/traits/auxiliary/trait_bounds_on_structs_and_enums_xc.rs b/src/test/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_bounds_on_structs_and_enums_xc.rs rename to src/test/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs diff --git a/src/test/ui/traits/trait-bounds-basic.rs b/src/test/ui/traits/bound/basic.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-basic.rs rename to src/test/ui/traits/bound/basic.rs diff --git a/src/test/ui/traits/trait-bounds.rs b/src/test/ui/traits/bound/generic_trait.rs similarity index 100% rename from src/test/ui/traits/trait-bounds.rs rename to src/test/ui/traits/bound/generic_trait.rs diff --git a/src/test/ui/traits/trait-bounds-impl-comparison-duplicates.rs b/src/test/ui/traits/bound/impl-comparison-duplicates.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-impl-comparison-duplicates.rs rename to src/test/ui/traits/bound/impl-comparison-duplicates.rs diff --git a/src/test/ui/traits/trait-bounds-in-arc.rs b/src/test/ui/traits/bound/in-arc.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-in-arc.rs rename to src/test/ui/traits/bound/in-arc.rs diff --git a/src/test/ui/traits/multiple-trait-bounds.rs b/src/test/ui/traits/bound/multiple.rs similarity index 100% rename from src/test/ui/traits/multiple-trait-bounds.rs rename to src/test/ui/traits/bound/multiple.rs diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs b/src/test/ui/traits/bound/not-on-bare-trait.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-not-on-bare-trait.rs rename to src/test/ui/traits/bound/not-on-bare-trait.rs diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr b/src/test/ui/traits/bound/not-on-bare-trait.stderr similarity index 89% rename from src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr rename to src/test/ui/traits/bound/not-on-bare-trait.stderr index 48eedc0b0ea..e7fc0fa5ec0 100644 --- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr +++ b/src/test/ui/traits/bound/not-on-bare-trait.stderr @@ -1,5 +1,5 @@ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/trait-bounds-not-on-bare-trait.rs:7:12 + --> $DIR/not-on-bare-trait.rs:7:12 | LL | fn foo(_x: Foo + Send) { | ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send` @@ -7,7 +7,7 @@ LL | fn foo(_x: Foo + Send) { = note: `#[warn(bare_trait_objects)]` on by default error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time - --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8 + --> $DIR/not-on-bare-trait.rs:7:8 | LL | fn foo(_x: Foo + Send) { | ^^ doesn't have a size known at compile-time diff --git a/src/test/ui/traits/trait-bounds-not-on-struct.rs b/src/test/ui/traits/bound/not-on-struct.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-not-on-struct.rs rename to src/test/ui/traits/bound/not-on-struct.rs diff --git a/src/test/ui/traits/trait-bounds-not-on-struct.stderr b/src/test/ui/traits/bound/not-on-struct.stderr similarity index 86% rename from src/test/ui/traits/trait-bounds-not-on-struct.stderr rename to src/test/ui/traits/bound/not-on-struct.stderr index 0f97e3bdf18..951e974ad26 100644 --- a/src/test/ui/traits/trait-bounds-not-on-struct.stderr +++ b/src/test/ui/traits/bound/not-on-struct.stderr @@ -1,23 +1,23 @@ error[E0226]: only a single explicit lifetime bound is permitted - --> $DIR/trait-bounds-not-on-struct.rs:25:25 + --> $DIR/not-on-struct.rs:25:25 | LL | fn e() -> 'static + A + 'static { | ^^^^^^^ error[E0226]: only a single explicit lifetime bound is permitted - --> $DIR/trait-bounds-not-on-struct.rs:29:53 + --> $DIR/not-on-struct.rs:29:53 | LL | fn f<'a,T,E>(iter: Iterator + 'a>) { | ^^ error[E0404]: expected trait, found struct `Foo` - --> $DIR/trait-bounds-not-on-struct.rs:8:16 + --> $DIR/not-on-struct.rs:8:16 | LL | fn foo(_x: Box) { } | ^^^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:8:22 + --> $DIR/not-on-struct.rs:8:22 | LL | fn foo(_x: Box) { } | --- ^^^^ ...because of this bound @@ -25,19 +25,19 @@ LL | fn foo(_x: Box) { } | expected this type to be a trait... error[E0404]: expected trait, found struct `Vec` - --> $DIR/trait-bounds-not-on-struct.rs:10:29 + --> $DIR/not-on-struct.rs:10:29 | LL | type TypeAlias = Box>; | ^^^^^^ not a trait error[E0404]: expected trait, found struct `A` - --> $DIR/trait-bounds-not-on-struct.rs:13:11 + --> $DIR/not-on-struct.rs:13:11 | LL | fn a() -> A + 'static { | ^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:13:15 + --> $DIR/not-on-struct.rs:13:15 | LL | fn a() -> A + 'static { | - ^^^^^^^ ...because of this bound @@ -49,13 +49,13 @@ LL | fn a() -> A { | -- error[E0404]: expected trait, found enum `Result` - --> $DIR/trait-bounds-not-on-struct.rs:16:34 + --> $DIR/not-on-struct.rs:16:34 | LL | fn b<'a,T,E>(iter: Iterator + 'a>) { | ^^^^^^^^^^^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:16:48 + --> $DIR/not-on-struct.rs:16:48 | LL | fn b<'a,T,E>(iter: Iterator + 'a>) { | ----------- ^^ ...because of this bound @@ -67,13 +67,13 @@ LL | fn b<'a,T,E>(iter: Iterator>) { | -- error[E0404]: expected trait, found struct `A` - --> $DIR/trait-bounds-not-on-struct.rs:19:21 + --> $DIR/not-on-struct.rs:19:21 | LL | fn c() -> 'static + A { | ^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:19:11 + --> $DIR/not-on-struct.rs:19:11 | LL | fn c() -> 'static + A { | ^^^^^^^ - expected this type to be a trait... @@ -85,13 +85,13 @@ LL | fn c() -> A { | -- error[E0404]: expected trait, found enum `Result` - --> $DIR/trait-bounds-not-on-struct.rs:22:39 + --> $DIR/not-on-struct.rs:22:39 | LL | fn d<'a,T,E>(iter: Iterator>) { | ^^^^^^^^^^^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:22:34 + --> $DIR/not-on-struct.rs:22:34 | LL | fn d<'a,T,E>(iter: Iterator>) { | ^^ ----------- expected this type to be a trait... @@ -103,13 +103,13 @@ LL | fn d<'a,T,E>(iter: Iterator>) { | -- error[E0404]: expected trait, found struct `A` - --> $DIR/trait-bounds-not-on-struct.rs:25:21 + --> $DIR/not-on-struct.rs:25:21 | LL | fn e() -> 'static + A + 'static { | ^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:25:11 + --> $DIR/not-on-struct.rs:25:11 | LL | fn e() -> 'static + A + 'static { | ^^^^^^^ - ^^^^^^^ ...because of these bounds @@ -121,13 +121,13 @@ LL | fn e() -> A { | --- error[E0404]: expected trait, found enum `Result` - --> $DIR/trait-bounds-not-on-struct.rs:29:39 + --> $DIR/not-on-struct.rs:29:39 | LL | fn f<'a,T,E>(iter: Iterator + 'a>) { | ^^^^^^^^^^^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:29:34 + --> $DIR/not-on-struct.rs:29:34 | LL | fn f<'a,T,E>(iter: Iterator + 'a>) { | ^^ ----------- ^^ ...because of these bounds @@ -139,7 +139,7 @@ LL | fn f<'a,T,E>(iter: Iterator>) { | -- -- error[E0404]: expected trait, found struct `Traitor` - --> $DIR/trait-bounds-not-on-struct.rs:35:11 + --> $DIR/not-on-struct.rs:35:11 | LL | trait Trait {} | ----------- similarly named trait `Trait` defined here @@ -147,7 +147,7 @@ LL | fn g() -> Traitor + 'static { | ^^^^^^^ not a trait | help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way - --> $DIR/trait-bounds-not-on-struct.rs:35:21 + --> $DIR/not-on-struct.rs:35:21 | LL | fn g() -> Traitor + 'static { | ------- ^^^^^^^ ...because of this bound diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.rs b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.rs rename to src/test/ui/traits/bound/on-structs-and-enums-in-fns.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.stderr similarity index 83% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr rename to src/test/ui/traits/bound/on-structs-and-enums-in-fns.stderr index 6ca8ce0707f..346b690d441 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u32: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:13:15 + --> $DIR/on-structs-and-enums-in-fns.rs:13:15 | LL | struct Foo { | ----- required by this bound in `Foo` @@ -8,7 +8,7 @@ LL | fn explode(x: Foo) {} | ^^^^^^^^ the trait `Trait` is not implemented for `u32` error[E0277]: the trait bound `f32: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:16:14 + --> $DIR/on-structs-and-enums-in-fns.rs:16:14 | LL | enum Bar { | ----- required by this bound in `Bar` diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.rs b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.rs rename to src/test/ui/traits/bound/on-structs-and-enums-in-impls.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.stderr b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.stderr similarity index 85% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.stderr rename to src/test/ui/traits/bound/on-structs-and-enums-in-impls.stderr index 87271e7f1ee..47bab6c375f 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u16: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-in-impls.rs:20:6 + --> $DIR/on-structs-and-enums-in-impls.rs:20:6 | LL | struct Foo { | ----- required by this bound in `Foo` diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.rs b/src/test/ui/traits/bound/on-structs-and-enums-locals.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.rs rename to src/test/ui/traits/bound/on-structs-and-enums-locals.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.stderr b/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr similarity index 83% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.stderr rename to src/test/ui/traits/bound/on-structs-and-enums-locals.stderr index df016a77274..967b7320ab6 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-locals.rs:15:14 + --> $DIR/on-structs-and-enums-locals.rs:15:14 | LL | struct Foo { | ----- required by this bound in `Foo` @@ -8,7 +8,7 @@ LL | let baz: Foo = loop { }; | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` error[E0277]: the trait bound `{integer}: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-locals.rs:10:15 + --> $DIR/on-structs-and-enums-locals.rs:10:15 | LL | struct Foo { | ------------------- required by `Foo` diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-rpass.rs b/src/test/ui/traits/bound/on-structs-and-enums-rpass.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-rpass.rs rename to src/test/ui/traits/bound/on-structs-and-enums-rpass.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.rs b/src/test/ui/traits/bound/on-structs-and-enums-static.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-static.rs rename to src/test/ui/traits/bound/on-structs-and-enums-static.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr b/src/test/ui/traits/bound/on-structs-and-enums-static.stderr similarity index 86% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr rename to src/test/ui/traits/bound/on-structs-and-enums-static.stderr index 4b650e78bad..2cf8a623b3f 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-static.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-static.rs:9:11 + --> $DIR/on-structs-and-enums-static.rs:9:11 | LL | struct Foo { | ----- required by this bound in `Foo` diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc.rs b/src/test/ui/traits/bound/on-structs-and-enums-xc.rs new file mode 100644 index 00000000000..94316d24040 --- /dev/null +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc.rs @@ -0,0 +1,14 @@ +// aux-build:on_structs_and_enums_xc.rs + +extern crate on_structs_and_enums_xc; + +use on_structs_and_enums_xc::{Bar, Foo, Trait}; + +fn explode(x: Foo) {} +//~^ ERROR E0277 + +fn kaboom(y: Bar) {} +//~^ ERROR E0277 + +fn main() { +} diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr similarity index 72% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr rename to src/test/ui/traits/bound/on-structs-and-enums-xc.stderr index 3e8c727dda0..0adb20d4828 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr @@ -1,21 +1,21 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-xc.rs:7:15 + --> $DIR/on-structs-and-enums-xc.rs:7:15 | LL | fn explode(x: Foo) {} | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` | - ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:5:18 + ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:5:18 | LL | pub struct Foo { | ----- required by this bound in `Foo` error[E0277]: the trait bound `f32: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-xc.rs:10:14 + --> $DIR/on-structs-and-enums-xc.rs:10:14 | LL | fn kaboom(y: Bar) {} | ^^^^^^^^ the trait `Trait` is not implemented for `f32` | - ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16 + ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16 | LL | pub enum Bar { | ----- required by this bound in `Bar` diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs b/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs new file mode 100644 index 00000000000..8156868e048 --- /dev/null +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs @@ -0,0 +1,15 @@ +// aux-build:on_structs_and_enums_xc.rs + +extern crate on_structs_and_enums_xc; + +use on_structs_and_enums_xc::{Bar, Foo, Trait}; + +fn main() { + let foo = Foo { + //~^ ERROR E0277 + x: 3 + }; + let bar: Bar = return; + //~^ ERROR E0277 + let _ = bar; +} diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr similarity index 76% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr rename to src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr index 899e9941995..08f0f20e748 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr @@ -1,16 +1,16 @@ error[E0277]: the trait bound `f64: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:12:14 + --> $DIR/on-structs-and-enums-xc1.rs:12:14 | LL | let bar: Bar = return; | ^^^^^^^^ the trait `Trait` is not implemented for `f64` | - ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16 + ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16 | LL | pub enum Bar { | ----- required by this bound in `Bar` error[E0277]: the trait bound `{integer}: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:8:15 + --> $DIR/on-structs-and-enums-xc1.rs:8:15 | LL | let foo = Foo { | ^^^ the trait `Trait` is not implemented for `{integer}` diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums.rs b/src/test/ui/traits/bound/on-structs-and-enums.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums.rs rename to src/test/ui/traits/bound/on-structs-and-enums.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr b/src/test/ui/traits/bound/on-structs-and-enums.stderr similarity index 85% rename from src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr rename to src/test/ui/traits/bound/on-structs-and-enums.stderr index d7549835a09..0c69e7b6fee 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr +++ b/src/test/ui/traits/bound/on-structs-and-enums.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:13:9 + --> $DIR/on-structs-and-enums.rs:13:9 | LL | struct Foo { | ----- required by this bound in `Foo` @@ -13,7 +13,7 @@ LL | impl Foo { | ^^^^^^^ error[E0277]: the trait bound `isize: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:19:8 + --> $DIR/on-structs-and-enums.rs:19:8 | LL | struct Foo { | ----- required by this bound in `Foo` @@ -22,7 +22,7 @@ LL | a: Foo, | ^^^^^^^^^^ the trait `Trait` is not implemented for `isize` error[E0277]: the trait bound `usize: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:23:10 + --> $DIR/on-structs-and-enums.rs:23:10 | LL | enum Bar { | ----- required by this bound in `Bar` @@ -31,7 +31,7 @@ LL | Quux(Bar), | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` error[E0277]: the trait bound `U: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:27:8 + --> $DIR/on-structs-and-enums.rs:27:8 | LL | struct Foo { | ----- required by this bound in `Foo` @@ -45,7 +45,7 @@ LL | struct Badness { | ^^^^^^^ error[E0277]: the trait bound `V: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:31:21 + --> $DIR/on-structs-and-enums.rs:31:21 | LL | enum Bar { | ----- required by this bound in `Bar` @@ -59,7 +59,7 @@ LL | enum MoreBadness { | ^^^^^^^ error[E0277]: the trait bound `i32: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:35:5 + --> $DIR/on-structs-and-enums.rs:35:5 | LL | struct Foo { | ----- required by this bound in `Foo` @@ -68,7 +68,7 @@ LL | Foo, | ^^^^^^^^ the trait `Trait` is not implemented for `i32` error[E0277]: the trait bound `u8: Trait` is not satisfied - --> $DIR/trait-bounds-on-structs-and-enums.rs:39:29 + --> $DIR/on-structs-and-enums.rs:39:29 | LL | enum Bar { | ----- required by this bound in `Bar` diff --git a/src/test/ui/traits/trait-bounds-recursion.rs b/src/test/ui/traits/bound/recursion.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-recursion.rs rename to src/test/ui/traits/bound/recursion.rs diff --git a/src/test/ui/traits/trait-bounds-same-crate-name.rs b/src/test/ui/traits/bound/same-crate-name.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-same-crate-name.rs rename to src/test/ui/traits/bound/same-crate-name.rs diff --git a/src/test/ui/traits/trait-bounds-same-crate-name.stderr b/src/test/ui/traits/bound/same-crate-name.stderr similarity index 92% rename from src/test/ui/traits/trait-bounds-same-crate-name.stderr rename to src/test/ui/traits/bound/same-crate-name.stderr index af5ba8808ff..c48f2f0efcf 100644 --- a/src/test/ui/traits/trait-bounds-same-crate-name.stderr +++ b/src/test/ui/traits/bound/same-crate-name.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied - --> $DIR/trait-bounds-same-crate-name.rs:31:20 + --> $DIR/same-crate-name.rs:31:20 | LL | a::try_foo(foo); | ^^^ the trait `main::a::Bar` is not implemented for `Foo` @@ -17,7 +17,7 @@ LL | impl Bar for Foo {} = note: perhaps two different versions of crate `crate_a2` are being used? error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied - --> $DIR/trait-bounds-same-crate-name.rs:38:20 + --> $DIR/same-crate-name.rs:38:20 | LL | a::try_foo(implements_no_traits); | ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait` @@ -28,7 +28,7 @@ LL | pub fn try_foo(x: impl Bar) {} | --- required by this bound in `try_foo` error[E0277]: the trait bound `ImplementsWrongTraitConditionally: main::a::Bar` is not satisfied - --> $DIR/trait-bounds-same-crate-name.rs:45:20 + --> $DIR/same-crate-name.rs:45:20 | LL | a::try_foo(other_variant_implements_mismatched_trait); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally` @@ -46,7 +46,7 @@ LL | impl Bar for ImplementsWrongTraitConditionally {} = note: perhaps two different versions of crate `crate_a2` are being used? error[E0277]: the trait bound `ImplementsTraitForUsize: main::a::Bar` is not satisfied - --> $DIR/trait-bounds-same-crate-name.rs:51:20 + --> $DIR/same-crate-name.rs:51:20 | LL | a::try_foo(other_variant_implements_correct_trait); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize` diff --git a/src/test/ui/traits/trait-bounds-sugar.rs b/src/test/ui/traits/bound/sugar.rs similarity index 100% rename from src/test/ui/traits/trait-bounds-sugar.rs rename to src/test/ui/traits/bound/sugar.rs diff --git a/src/test/ui/traits/trait-bounds-sugar.stderr b/src/test/ui/traits/bound/sugar.stderr similarity index 90% rename from src/test/ui/traits/trait-bounds-sugar.stderr rename to src/test/ui/traits/bound/sugar.stderr index 6bd335fe473..feb0c73a09d 100644 --- a/src/test/ui/traits/trait-bounds-sugar.stderr +++ b/src/test/ui/traits/bound/sugar.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/trait-bounds-sugar.rs:12:7 + --> $DIR/sugar.rs:12:7 | LL | a(x); | ^ expected trait `Foo + Send`, found trait `Foo + Sync` diff --git a/src/test/ui/traits/trait-cache-issue-18209.rs b/src/test/ui/traits/cache-issue-18209.rs similarity index 100% rename from src/test/ui/traits/trait-cache-issue-18209.rs rename to src/test/ui/traits/cache-issue-18209.rs diff --git a/src/test/ui/traits/trait-coercion-generic-bad.rs b/src/test/ui/traits/coercion-generic-bad.rs similarity index 100% rename from src/test/ui/traits/trait-coercion-generic-bad.rs rename to src/test/ui/traits/coercion-generic-bad.rs diff --git a/src/test/ui/traits/trait-coercion-generic-bad.stderr b/src/test/ui/traits/coercion-generic-bad.stderr similarity index 92% rename from src/test/ui/traits/trait-coercion-generic-bad.stderr rename to src/test/ui/traits/coercion-generic-bad.stderr index f2710dea095..f367d396da0 100644 --- a/src/test/ui/traits/trait-coercion-generic-bad.stderr +++ b/src/test/ui/traits/coercion-generic-bad.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Struct: Trait` is not satisfied - --> $DIR/trait-coercion-generic-bad.rs:16:36 + --> $DIR/coercion-generic-bad.rs:16:36 | LL | let s: Box> = Box::new(Struct { person: "Fred" }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `Struct` diff --git a/src/test/ui/traits/trait-coercion-generic-regions.rs b/src/test/ui/traits/coercion-generic-regions.rs similarity index 100% rename from src/test/ui/traits/trait-coercion-generic-regions.rs rename to src/test/ui/traits/coercion-generic-regions.rs diff --git a/src/test/ui/traits/trait-coercion-generic-regions.stderr b/src/test/ui/traits/coercion-generic-regions.stderr similarity index 91% rename from src/test/ui/traits/trait-coercion-generic-regions.stderr rename to src/test/ui/traits/coercion-generic-regions.stderr index d21b48e571d..5cfb6490123 100644 --- a/src/test/ui/traits/trait-coercion-generic-regions.stderr +++ b/src/test/ui/traits/coercion-generic-regions.stderr @@ -1,5 +1,5 @@ error[E0597]: `person` does not live long enough - --> $DIR/trait-coercion-generic-regions.rs:17:24 + --> $DIR/coercion-generic-regions.rs:17:24 | LL | let person: &str = &person; | ^^^^^^^ diff --git a/src/test/ui/traits/trait-coercion-generic.rs b/src/test/ui/traits/coercion-generic.rs similarity index 100% rename from src/test/ui/traits/trait-coercion-generic.rs rename to src/test/ui/traits/coercion-generic.rs diff --git a/src/test/ui/traits/trait-coercion.rs b/src/test/ui/traits/coercion.rs similarity index 100% rename from src/test/ui/traits/trait-coercion.rs rename to src/test/ui/traits/coercion.rs diff --git a/src/test/ui/traits/trait-composition-trivial.rs b/src/test/ui/traits/composition-trivial.rs similarity index 100% rename from src/test/ui/traits/trait-composition-trivial.rs rename to src/test/ui/traits/composition-trivial.rs diff --git a/src/test/ui/traits/traits-conditional-dispatch.rs b/src/test/ui/traits/conditional-dispatch.rs similarity index 100% rename from src/test/ui/traits/traits-conditional-dispatch.rs rename to src/test/ui/traits/conditional-dispatch.rs diff --git a/src/test/ui/traits/traits-conditional-model-fn.rs b/src/test/ui/traits/conditional-model-fn.rs similarity index 100% rename from src/test/ui/traits/traits-conditional-model-fn.rs rename to src/test/ui/traits/conditional-model-fn.rs diff --git a/src/test/ui/traits/trait-copy-guessing.rs b/src/test/ui/traits/copy-guessing.rs similarity index 100% rename from src/test/ui/traits/trait-copy-guessing.rs rename to src/test/ui/traits/copy-guessing.rs diff --git a/src/test/ui/traits/cycle-trait-type-trait.rs b/src/test/ui/traits/cycle-type-trait.rs similarity index 100% rename from src/test/ui/traits/cycle-trait-type-trait.rs rename to src/test/ui/traits/cycle-type-trait.rs diff --git a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux.rs b/src/test/ui/traits/default-method/auxiliary/xc.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_default_method_xc_aux.rs rename to src/test/ui/traits/default-method/auxiliary/xc.rs diff --git a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux_2.rs b/src/test/ui/traits/default-method/auxiliary/xc_2.rs similarity index 73% rename from src/test/ui/traits/auxiliary/trait_default_method_xc_aux_2.rs rename to src/test/ui/traits/default-method/auxiliary/xc_2.rs index 15480132a23..9792338204c 100644 --- a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux_2.rs +++ b/src/test/ui/traits/default-method/auxiliary/xc_2.rs @@ -1,6 +1,6 @@ -// aux-build:trait_default_method_xc_aux.rs +// aux-build:xc.rs -extern crate trait_default_method_xc_aux as aux; +extern crate xc as aux; use aux::A; pub struct a_struct { pub x: isize } diff --git a/src/test/ui/traits/trait-default-method-bound-subst.rs b/src/test/ui/traits/default-method/bound-subst.rs similarity index 100% rename from src/test/ui/traits/trait-default-method-bound-subst.rs rename to src/test/ui/traits/default-method/bound-subst.rs diff --git a/src/test/ui/traits/trait-default-method-bound-subst2.rs b/src/test/ui/traits/default-method/bound-subst2.rs similarity index 100% rename from src/test/ui/traits/trait-default-method-bound-subst2.rs rename to src/test/ui/traits/default-method/bound-subst2.rs diff --git a/src/test/ui/traits/trait-default-method-bound-subst3.rs b/src/test/ui/traits/default-method/bound-subst3.rs similarity index 100% rename from src/test/ui/traits/trait-default-method-bound-subst3.rs rename to src/test/ui/traits/default-method/bound-subst3.rs diff --git a/src/test/ui/traits/trait-default-method-bound-subst4.rs b/src/test/ui/traits/default-method/bound-subst4.rs similarity index 100% rename from src/test/ui/traits/trait-default-method-bound-subst4.rs rename to src/test/ui/traits/default-method/bound-subst4.rs diff --git a/src/test/ui/traits/trait-default-method-bound.rs b/src/test/ui/traits/default-method/bound.rs similarity index 100% rename from src/test/ui/traits/trait-default-method-bound.rs rename to src/test/ui/traits/default-method/bound.rs diff --git a/src/test/ui/traits/traits-default-method-macro.rs b/src/test/ui/traits/default-method/macro.rs similarity index 100% rename from src/test/ui/traits/traits-default-method-macro.rs rename to src/test/ui/traits/default-method/macro.rs diff --git a/src/test/ui/traits/traits-default-method-mut.rs b/src/test/ui/traits/default-method/mut.rs similarity index 100% rename from src/test/ui/traits/traits-default-method-mut.rs rename to src/test/ui/traits/default-method/mut.rs diff --git a/src/test/ui/traits/traits-default-method-self.rs b/src/test/ui/traits/default-method/self.rs similarity index 100% rename from src/test/ui/traits/traits-default-method-self.rs rename to src/test/ui/traits/default-method/self.rs diff --git a/src/test/ui/traits/default-method-supertrait-vtable.rs b/src/test/ui/traits/default-method/supervtable.rs similarity index 100% rename from src/test/ui/traits/default-method-supertrait-vtable.rs rename to src/test/ui/traits/default-method/supervtable.rs diff --git a/src/test/ui/traits/traits-default-method-trivial.rs b/src/test/ui/traits/default-method/trivial.rs similarity index 100% rename from src/test/ui/traits/traits-default-method-trivial.rs rename to src/test/ui/traits/default-method/trivial.rs diff --git a/src/test/ui/traits/trait-default-method-xc-2.rs b/src/test/ui/traits/default-method/xc-2.rs similarity index 63% rename from src/test/ui/traits/trait-default-method-xc-2.rs rename to src/test/ui/traits/default-method/xc-2.rs index 5fa1a6cba72..1de61dcf896 100644 --- a/src/test/ui/traits/trait-default-method-xc-2.rs +++ b/src/test/ui/traits/default-method/xc-2.rs @@ -1,11 +1,11 @@ // run-pass -// aux-build:trait_default_method_xc_aux.rs -// aux-build:trait_default_method_xc_aux_2.rs +// aux-build:xc.rs +// aux-build:xc_2.rs -extern crate trait_default_method_xc_aux as aux; -extern crate trait_default_method_xc_aux_2 as aux2; +extern crate xc as aux; +extern crate xc_2 as aux2; use aux::A; use aux2::{a_struct, welp}; diff --git a/src/test/ui/traits/trait-default-method-xc.rs b/src/test/ui/traits/default-method/xc.rs similarity index 94% rename from src/test/ui/traits/trait-default-method-xc.rs rename to src/test/ui/traits/default-method/xc.rs index 3c20a649613..76a1573d6c7 100644 --- a/src/test/ui/traits/trait-default-method-xc.rs +++ b/src/test/ui/traits/default-method/xc.rs @@ -2,10 +2,10 @@ #![allow(dead_code)] #![allow(non_camel_case_types)] -// aux-build:trait_default_method_xc_aux.rs +// aux-build:xc.rs -extern crate trait_default_method_xc_aux as aux; +extern crate xc as aux; use aux::{A, TestEquality, Something}; use aux::B; diff --git a/src/test/ui/traits/trait-duplicate-methods.rs b/src/test/ui/traits/duplicate-methods.rs similarity index 100% rename from src/test/ui/traits/trait-duplicate-methods.rs rename to src/test/ui/traits/duplicate-methods.rs diff --git a/src/test/ui/traits/trait-duplicate-methods.stderr b/src/test/ui/traits/duplicate-methods.stderr similarity index 91% rename from src/test/ui/traits/trait-duplicate-methods.stderr rename to src/test/ui/traits/duplicate-methods.stderr index 7cba4cb63e6..6aa88d0dff4 100644 --- a/src/test/ui/traits/trait-duplicate-methods.stderr +++ b/src/test/ui/traits/duplicate-methods.stderr @@ -1,5 +1,5 @@ error[E0428]: the name `orange` is defined multiple times - --> $DIR/trait-duplicate-methods.rs:3:5 + --> $DIR/duplicate-methods.rs:3:5 | LL | fn orange(&self); | ----------------- previous definition of the value `orange` here diff --git a/src/test/ui/traits/traits-elaborate-type-region.rs b/src/test/ui/traits/elaborate-type-region.rs similarity index 100% rename from src/test/ui/traits/traits-elaborate-type-region.rs rename to src/test/ui/traits/elaborate-type-region.rs diff --git a/src/test/ui/traits/trait-false-ambiguity-where-clause-builtin-bound.rs b/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs similarity index 100% rename from src/test/ui/traits/trait-false-ambiguity-where-clause-builtin-bound.rs rename to src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs diff --git a/src/test/ui/traits/trait-generic.rs b/src/test/ui/traits/generic.rs similarity index 100% rename from src/test/ui/traits/trait-generic.rs rename to src/test/ui/traits/generic.rs diff --git a/src/test/ui/traits/trait-impl-1.rs b/src/test/ui/traits/impl-1.rs similarity index 100% rename from src/test/ui/traits/trait-impl-1.rs rename to src/test/ui/traits/impl-1.rs diff --git a/src/test/ui/traits/trait-impl-1.stderr b/src/test/ui/traits/impl-1.stderr similarity index 88% rename from src/test/ui/traits/trait-impl-1.stderr rename to src/test/ui/traits/impl-1.stderr index da0936e8eeb..7694e3f5cfa 100644 --- a/src/test/ui/traits/trait-impl-1.stderr +++ b/src/test/ui/traits/impl-1.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `foo` found for reference `&i32` in the current scope - --> $DIR/trait-impl-1.rs:15:7 + --> $DIR/impl-1.rs:15:7 | LL | x.foo(); | ^^^ method not found in `&i32` diff --git a/src/test/ui/traits/trait-impl-2.rs b/src/test/ui/traits/impl-2.rs similarity index 100% rename from src/test/ui/traits/trait-impl-2.rs rename to src/test/ui/traits/impl-2.rs diff --git a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.rs b/src/test/ui/traits/impl-can-not-have-untraitful-items.rs similarity index 100% rename from src/test/ui/traits/trait-impl-can-not-have-untraitful-items.rs rename to src/test/ui/traits/impl-can-not-have-untraitful-items.rs diff --git a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr b/src/test/ui/traits/impl-can-not-have-untraitful-items.stderr similarity index 76% rename from src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr rename to src/test/ui/traits/impl-can-not-have-untraitful-items.stderr index 0abed79d384..7f56f34ea15 100644 --- a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr +++ b/src/test/ui/traits/impl-can-not-have-untraitful-items.stderr @@ -1,17 +1,17 @@ error[E0438]: const `BAR` is not a member of trait `A` - --> $DIR/trait-impl-can-not-have-untraitful-items.rs:4:5 + --> $DIR/impl-can-not-have-untraitful-items.rs:4:5 | LL | const BAR: () = (); | ^^^^^^^^^^^^^^^^^^^ not a member of trait `A` error[E0437]: type `Baz` is not a member of trait `A` - --> $DIR/trait-impl-can-not-have-untraitful-items.rs:5:5 + --> $DIR/impl-can-not-have-untraitful-items.rs:5:5 | LL | type Baz = (); | ^^^^^^^^^^^^^^ not a member of trait `A` error[E0407]: method `foo` is not a member of trait `A` - --> $DIR/trait-impl-can-not-have-untraitful-items.rs:6:5 + --> $DIR/impl-can-not-have-untraitful-items.rs:6:5 | LL | fn foo(&self) { } | ^^^^^^^^^^^^^^^^^ not a member of trait `A` diff --git a/src/test/ui/traits/trait-impl-different-num-params.rs b/src/test/ui/traits/impl-different-num-params.rs similarity index 100% rename from src/test/ui/traits/trait-impl-different-num-params.rs rename to src/test/ui/traits/impl-different-num-params.rs diff --git a/src/test/ui/traits/trait-impl-different-num-params.stderr b/src/test/ui/traits/impl-different-num-params.stderr similarity index 88% rename from src/test/ui/traits/trait-impl-different-num-params.stderr rename to src/test/ui/traits/impl-different-num-params.stderr index 5ab93614f24..910ba351064 100644 --- a/src/test/ui/traits/trait-impl-different-num-params.stderr +++ b/src/test/ui/traits/impl-different-num-params.stderr @@ -1,5 +1,5 @@ error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 2 - --> $DIR/trait-impl-different-num-params.rs:5:12 + --> $DIR/impl-different-num-params.rs:5:12 | LL | fn bar(&self, x: usize) -> Self; | --------------- trait requires 2 parameters diff --git a/src/test/ui/traits/trait-impl-for-module.rs b/src/test/ui/traits/impl-for-module.rs similarity index 100% rename from src/test/ui/traits/trait-impl-for-module.rs rename to src/test/ui/traits/impl-for-module.rs diff --git a/src/test/ui/traits/trait-impl-for-module.stderr b/src/test/ui/traits/impl-for-module.stderr similarity index 88% rename from src/test/ui/traits/trait-impl-for-module.stderr rename to src/test/ui/traits/impl-for-module.stderr index cd2713a5bd5..6ec4083b513 100644 --- a/src/test/ui/traits/trait-impl-for-module.stderr +++ b/src/test/ui/traits/impl-for-module.stderr @@ -1,5 +1,5 @@ error[E0573]: expected type, found module `a` - --> $DIR/trait-impl-for-module.rs:7:12 + --> $DIR/impl-for-module.rs:7:12 | LL | trait A { | ------- similarly named trait `A` defined here diff --git a/src/test/ui/traits/trait-impl-method-mismatch.rs b/src/test/ui/traits/impl-method-mismatch.rs similarity index 100% rename from src/test/ui/traits/trait-impl-method-mismatch.rs rename to src/test/ui/traits/impl-method-mismatch.rs diff --git a/src/test/ui/traits/trait-impl-method-mismatch.stderr b/src/test/ui/traits/impl-method-mismatch.stderr similarity index 92% rename from src/test/ui/traits/trait-impl-method-mismatch.stderr rename to src/test/ui/traits/impl-method-mismatch.stderr index 52e49186241..c909446d9dc 100644 --- a/src/test/ui/traits/trait-impl-method-mismatch.stderr +++ b/src/test/ui/traits/impl-method-mismatch.stderr @@ -1,5 +1,5 @@ error[E0053]: method `jumbo` has an incompatible type for trait - --> $DIR/trait-impl-method-mismatch.rs:7:5 + --> $DIR/impl-method-mismatch.rs:7:5 | LL | fn jumbo(&self, x: &usize) -> usize; | ------------------------------------ type in trait diff --git a/src/test/ui/traits/traits-impl-object-overlap-issue-23853.rs b/src/test/ui/traits/impl-object-overlap-issue-23853.rs similarity index 100% rename from src/test/ui/traits/traits-impl-object-overlap-issue-23853.rs rename to src/test/ui/traits/impl-object-overlap-issue-23853.rs diff --git a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.rs similarity index 100% rename from src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs rename to src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.rs diff --git a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr similarity index 72% rename from src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr rename to src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr index 46aa7db967a..539a56f010a 100644 --- a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr +++ b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr @@ -1,21 +1,21 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements - --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 + --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 | LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 24:6... - --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6 + --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6 | LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^ note: ...but the lifetime must also be valid for the lifetime `'b` as defined on the impl at 24:9... - --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9 + --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9 | LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^ note: ...so that the types are compatible - --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 + --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 | LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^^^^^^^^^ diff --git a/src/test/ui/traits/trait-impl.rs b/src/test/ui/traits/impl.rs similarity index 100% rename from src/test/ui/traits/trait-impl.rs rename to src/test/ui/traits/impl.rs diff --git a/src/test/ui/traits/traits-inductive-overflow-lifetime.rs b/src/test/ui/traits/inductive-overflow/lifetime.rs similarity index 100% rename from src/test/ui/traits/traits-inductive-overflow-lifetime.rs rename to src/test/ui/traits/inductive-overflow/lifetime.rs diff --git a/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr b/src/test/ui/traits/inductive-overflow/lifetime.stderr similarity index 89% rename from src/test/ui/traits/traits-inductive-overflow-lifetime.stderr rename to src/test/ui/traits/inductive-overflow/lifetime.stderr index b904826081f..659f9e26e3e 100644 --- a/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr +++ b/src/test/ui/traits/inductive-overflow/lifetime.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `Box>>: NotAuto` - --> $DIR/traits-inductive-overflow-lifetime.rs:27:5 + --> $DIR/lifetime.rs:27:5 | LL | fn is_send() {} | ------- required by this bound in `is_send` diff --git a/src/test/ui/traits/traits-inductive-overflow-simultaneous.rs b/src/test/ui/traits/inductive-overflow/simultaneous.rs similarity index 100% rename from src/test/ui/traits/traits-inductive-overflow-simultaneous.rs rename to src/test/ui/traits/inductive-overflow/simultaneous.rs diff --git a/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr b/src/test/ui/traits/inductive-overflow/simultaneous.stderr similarity index 87% rename from src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr rename to src/test/ui/traits/inductive-overflow/simultaneous.stderr index a0d2d13fbf3..484ac851179 100644 --- a/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr +++ b/src/test/ui/traits/inductive-overflow/simultaneous.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `{integer}: Tweedledum` - --> $DIR/traits-inductive-overflow-simultaneous.rs:18:5 + --> $DIR/simultaneous.rs:18:5 | LL | fn is_ee(t: T) { | ----- required by this bound in `is_ee` diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.rs similarity index 100% rename from src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs rename to src/test/ui/traits/inductive-overflow/supertrait-auto-trait.rs diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr similarity index 85% rename from src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr rename to src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr index 140ffa4b079..6a0f7398cf1 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr +++ b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr @@ -1,5 +1,5 @@ error[E0568]: auto traits cannot have super traits - --> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:8:19 + --> $DIR/supertrait-auto-trait.rs:8:19 | LL | auto trait Magic: Copy {} | ----- ^^^^ help: remove the super traits @@ -7,7 +7,7 @@ LL | auto trait Magic: Copy {} | auto trait cannot have super traits error[E0277]: the trait bound `NoClone: Copy` is not satisfied - --> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:16:23 + --> $DIR/supertrait-auto-trait.rs:16:23 | LL | fn copy(x: T) -> (T, T) { (x, x) } | ----- required by this bound in `copy` diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait.rs b/src/test/ui/traits/inductive-overflow/supertrait.rs similarity index 100% rename from src/test/ui/traits/traits-inductive-overflow-supertrait.rs rename to src/test/ui/traits/inductive-overflow/supertrait.rs diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr b/src/test/ui/traits/inductive-overflow/supertrait.stderr similarity index 88% rename from src/test/ui/traits/traits-inductive-overflow-supertrait.stderr rename to src/test/ui/traits/inductive-overflow/supertrait.stderr index a86648d9a17..dfb967601e9 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr +++ b/src/test/ui/traits/inductive-overflow/supertrait.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `NoClone: Magic` - --> $DIR/traits-inductive-overflow-supertrait.rs:13:18 + --> $DIR/supertrait.rs:13:18 | LL | fn copy(x: T) -> (T, T) { (x, x) } | ----- required by this bound in `copy` diff --git a/src/test/ui/traits/traits-inductive-overflow-two-traits.rs b/src/test/ui/traits/inductive-overflow/two-traits.rs similarity index 100% rename from src/test/ui/traits/traits-inductive-overflow-two-traits.rs rename to src/test/ui/traits/inductive-overflow/two-traits.rs diff --git a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr b/src/test/ui/traits/inductive-overflow/two-traits.stderr similarity index 87% rename from src/test/ui/traits/traits-inductive-overflow-two-traits.stderr rename to src/test/ui/traits/inductive-overflow/two-traits.stderr index 996544ae516..d3f2931f25d 100644 --- a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr +++ b/src/test/ui/traits/inductive-overflow/two-traits.stderr @@ -1,5 +1,5 @@ error[E0277]: `T` cannot be shared between threads safely - --> $DIR/traits-inductive-overflow-two-traits.rs:11:5 + --> $DIR/two-traits.rs:11:5 | LL | type X: Trait; | ----- required by this bound in `Magic::X` @@ -13,7 +13,7 @@ LL | impl Magic for T { | ^^^^^^ error[E0275]: overflow evaluating the requirement `*mut (): Magic` - --> $DIR/traits-inductive-overflow-two-traits.rs:20:5 + --> $DIR/two-traits.rs:20:5 | LL | fn wizard() { check::<::X>(); } | ----- required by this bound in `wizard` diff --git a/src/test/ui/traits/infer-from-object-trait-issue-26952.rs b/src/test/ui/traits/infer-from-object-issue-26952.rs similarity index 100% rename from src/test/ui/traits/infer-from-object-trait-issue-26952.rs rename to src/test/ui/traits/infer-from-object-issue-26952.rs diff --git a/src/test/ui/traits/inherent-trait-method-order.rs b/src/test/ui/traits/inherent-method-order.rs similarity index 100% rename from src/test/ui/traits/inherent-trait-method-order.rs rename to src/test/ui/traits/inherent-method-order.rs diff --git a/src/test/ui/traits/trait-inheritance-auto-xc-2.rs b/src/test/ui/traits/inheritance/auto-xc-2.rs similarity index 78% rename from src/test/ui/traits/trait-inheritance-auto-xc-2.rs rename to src/test/ui/traits/inheritance/auto-xc-2.rs index 62c3ce8030c..f2130228d51 100644 --- a/src/test/ui/traits/trait-inheritance-auto-xc-2.rs +++ b/src/test/ui/traits/inheritance/auto-xc-2.rs @@ -1,8 +1,8 @@ // run-pass -// aux-build:trait_inheritance_auto_xc_2_aux.rs +// aux-build:auto_xc_2.rs -extern crate trait_inheritance_auto_xc_2_aux as aux; +extern crate auto_xc_2 as aux; // aux defines impls of Foo, Bar and Baz for A use aux::{Foo, Bar, Baz, A}; diff --git a/src/test/ui/traits/trait-inheritance-auto-xc.rs b/src/test/ui/traits/inheritance/auto-xc.rs similarity index 80% rename from src/test/ui/traits/trait-inheritance-auto-xc.rs rename to src/test/ui/traits/inheritance/auto-xc.rs index e8e651091ad..3d5ae182af1 100644 --- a/src/test/ui/traits/trait-inheritance-auto-xc.rs +++ b/src/test/ui/traits/inheritance/auto-xc.rs @@ -1,9 +1,9 @@ // run-pass #![allow(dead_code)] -// aux-build:trait_inheritance_auto_xc_aux.rs +// aux-build:auto_xc.rs -extern crate trait_inheritance_auto_xc_aux as aux; +extern crate auto_xc as aux; use aux::{Foo, Bar, Baz, Quux}; diff --git a/src/test/ui/traits/trait-inheritance-auto.rs b/src/test/ui/traits/inheritance/auto.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-auto.rs rename to src/test/ui/traits/inheritance/auto.rs diff --git a/src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_aux.rs b/src/test/ui/traits/inheritance/auxiliary/auto_xc.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_aux.rs rename to src/test/ui/traits/inheritance/auxiliary/auto_xc.rs diff --git a/src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_2_aux.rs b/src/test/ui/traits/inheritance/auxiliary/auto_xc_2.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_2_aux.rs rename to src/test/ui/traits/inheritance/auxiliary/auto_xc_2.rs diff --git a/src/test/ui/traits/auxiliary/trait_inheritance_overloading_xc.rs b/src/test/ui/traits/inheritance/auxiliary/overloading_xc.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_inheritance_overloading_xc.rs rename to src/test/ui/traits/inheritance/auxiliary/overloading_xc.rs diff --git a/src/test/ui/traits/auxiliary/trait_xc_call_aux.rs b/src/test/ui/traits/inheritance/auxiliary/xc_call.rs similarity index 100% rename from src/test/ui/traits/auxiliary/trait_xc_call_aux.rs rename to src/test/ui/traits/inheritance/auxiliary/xc_call.rs diff --git a/src/test/ui/traits/trait-inheritance2.rs b/src/test/ui/traits/inheritance/basic.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance2.rs rename to src/test/ui/traits/inheritance/basic.rs diff --git a/src/test/ui/traits/trait-inheritance-call-bound-inherited.rs b/src/test/ui/traits/inheritance/call-bound-inherited.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-call-bound-inherited.rs rename to src/test/ui/traits/inheritance/call-bound-inherited.rs diff --git a/src/test/ui/traits/trait-inheritance-call-bound-inherited2.rs b/src/test/ui/traits/inheritance/call-bound-inherited2.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-call-bound-inherited2.rs rename to src/test/ui/traits/inheritance/call-bound-inherited2.rs diff --git a/src/test/ui/traits/trait-inheritance-cast-without-call-to-supertrait.rs b/src/test/ui/traits/inheritance/cast-without-call-to-supertrait.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-cast-without-call-to-supertrait.rs rename to src/test/ui/traits/inheritance/cast-without-call-to-supertrait.rs diff --git a/src/test/ui/traits/trait-inheritance-cast.rs b/src/test/ui/traits/inheritance/cast.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-cast.rs rename to src/test/ui/traits/inheritance/cast.rs diff --git a/src/test/ui/traits/trait-inheritance-cross-trait-call-xc.rs b/src/test/ui/traits/inheritance/cross-trait-call-xc.rs similarity index 74% rename from src/test/ui/traits/trait-inheritance-cross-trait-call-xc.rs rename to src/test/ui/traits/inheritance/cross-trait-call-xc.rs index dbefb22cb72..99fbb5c6148 100644 --- a/src/test/ui/traits/trait-inheritance-cross-trait-call-xc.rs +++ b/src/test/ui/traits/inheritance/cross-trait-call-xc.rs @@ -1,8 +1,8 @@ // run-pass -// aux-build:trait_xc_call_aux.rs +// aux-build:xc_call.rs -extern crate trait_xc_call_aux as aux; +extern crate xc_call as aux; use aux::Foo; diff --git a/src/test/ui/traits/trait-inheritance-cross-trait-call.rs b/src/test/ui/traits/inheritance/cross-trait-call.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-cross-trait-call.rs rename to src/test/ui/traits/inheritance/cross-trait-call.rs diff --git a/src/test/ui/traits/trait-inheritance-diamond.rs b/src/test/ui/traits/inheritance/diamond.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-diamond.rs rename to src/test/ui/traits/inheritance/diamond.rs diff --git a/src/test/ui/traits/trait-inheritance-multiple-inheritors.rs b/src/test/ui/traits/inheritance/multiple-inheritors.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-multiple-inheritors.rs rename to src/test/ui/traits/inheritance/multiple-inheritors.rs diff --git a/src/test/ui/traits/trait-inheritance-multiple-params.rs b/src/test/ui/traits/inheritance/multiple-params.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-multiple-params.rs rename to src/test/ui/traits/inheritance/multiple-params.rs diff --git a/src/test/ui/traits/trait-inheritance-num.rs b/src/test/ui/traits/inheritance/num.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-num.rs rename to src/test/ui/traits/inheritance/num.rs diff --git a/src/test/ui/traits/trait-inheritance-num0.rs b/src/test/ui/traits/inheritance/num0.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-num0.rs rename to src/test/ui/traits/inheritance/num0.rs diff --git a/src/test/ui/traits/trait-inheritance-num1.rs b/src/test/ui/traits/inheritance/num1.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-num1.rs rename to src/test/ui/traits/inheritance/num1.rs diff --git a/src/test/ui/traits/trait-inheritance-num2.rs b/src/test/ui/traits/inheritance/num2.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-num2.rs rename to src/test/ui/traits/inheritance/num2.rs diff --git a/src/test/ui/traits/trait-inheritance-num3.rs b/src/test/ui/traits/inheritance/num3.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-num3.rs rename to src/test/ui/traits/inheritance/num3.rs diff --git a/src/test/ui/traits/trait-inheritance-num5.rs b/src/test/ui/traits/inheritance/num5.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-num5.rs rename to src/test/ui/traits/inheritance/num5.rs diff --git a/src/test/ui/traits/trait-inheritance-overloading-simple.rs b/src/test/ui/traits/inheritance/overloading-simple.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-overloading-simple.rs rename to src/test/ui/traits/inheritance/overloading-simple.rs diff --git a/src/test/ui/traits/trait-inheritance-overloading-xc-exe.rs b/src/test/ui/traits/inheritance/overloading-xc-exe.rs similarity index 68% rename from src/test/ui/traits/trait-inheritance-overloading-xc-exe.rs rename to src/test/ui/traits/inheritance/overloading-xc-exe.rs index 2a9acfdd04a..08778061ba1 100644 --- a/src/test/ui/traits/trait-inheritance-overloading-xc-exe.rs +++ b/src/test/ui/traits/inheritance/overloading-xc-exe.rs @@ -1,9 +1,9 @@ // run-pass -// aux-build:trait_inheritance_overloading_xc.rs +// aux-build:overloading_xc.rs -extern crate trait_inheritance_overloading_xc; -use trait_inheritance_overloading_xc::{MyNum, MyInt}; +extern crate overloading_xc; +use overloading_xc::{MyNum, MyInt}; fn f(x: T, y: T) -> (T, T, T) { return (x.clone() + y.clone(), x.clone() - y.clone(), x * y); diff --git a/src/test/ui/traits/trait-inheritance-overloading.rs b/src/test/ui/traits/inheritance/overloading.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-overloading.rs rename to src/test/ui/traits/inheritance/overloading.rs diff --git a/src/test/ui/traits/traits-repeated-supertrait-ambig.rs b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.rs similarity index 100% rename from src/test/ui/traits/traits-repeated-supertrait-ambig.rs rename to src/test/ui/traits/inheritance/repeated-supertrait-ambig.rs diff --git a/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr similarity index 87% rename from src/test/ui/traits/traits-repeated-supertrait-ambig.stderr rename to src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr index 4107c49bd80..5353b5e2260 100644 --- a/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr +++ b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied - --> $DIR/traits-repeated-supertrait-ambig.rs:26:7 + --> $DIR/repeated-supertrait-ambig.rs:26:7 | LL | c.same_as(22) | ^^^^^^^ the trait `CompareTo` is not implemented for `dyn CompareToInts` error[E0277]: the trait bound `C: CompareTo` is not satisfied - --> $DIR/traits-repeated-supertrait-ambig.rs:30:7 + --> $DIR/repeated-supertrait-ambig.rs:30:7 | LL | c.same_as(22) | ^^^^^^^ the trait `CompareTo` is not implemented for `C` @@ -16,7 +16,7 @@ LL | fn with_trait>(c: &C) -> bool { | ^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied - --> $DIR/traits-repeated-supertrait-ambig.rs:34:5 + --> $DIR/repeated-supertrait-ambig.rs:34:5 | LL | fn same_as(&self, t: T) -> bool; | -------------------------------- required by `CompareTo::same_as` @@ -25,7 +25,7 @@ LL | CompareToInts::same_as(c, 22) | ^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo` is not implemented for `dyn CompareToInts` error[E0277]: the trait bound `C: CompareTo` is not satisfied - --> $DIR/traits-repeated-supertrait-ambig.rs:38:5 + --> $DIR/repeated-supertrait-ambig.rs:38:5 | LL | fn same_as(&self, t: T) -> bool; | -------------------------------- required by `CompareTo::same_as` @@ -39,7 +39,7 @@ LL | fn with_ufcs2>(c: &C) -> bool { | ^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `i64: CompareTo` is not satisfied - --> $DIR/traits-repeated-supertrait-ambig.rs:42:23 + --> $DIR/repeated-supertrait-ambig.rs:42:23 | LL | assert_eq!(22_i64.same_as(22), true); | ^^^^^^^ the trait `CompareTo` is not implemented for `i64` diff --git a/src/test/ui/traits/traits-repeated-supertrait.rs b/src/test/ui/traits/inheritance/repeated-supertrait.rs similarity index 100% rename from src/test/ui/traits/traits-repeated-supertrait.rs rename to src/test/ui/traits/inheritance/repeated-supertrait.rs diff --git a/src/test/ui/traits/trait-inheritance-self-in-supertype.rs b/src/test/ui/traits/inheritance/self-in-supertype.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-self-in-supertype.rs rename to src/test/ui/traits/inheritance/self-in-supertype.rs diff --git a/src/test/ui/traits/trait-inheritance-self.rs b/src/test/ui/traits/inheritance/self.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-self.rs rename to src/test/ui/traits/inheritance/self.rs diff --git a/src/test/ui/traits/trait-inheritance-simple.rs b/src/test/ui/traits/inheritance/simple.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-simple.rs rename to src/test/ui/traits/inheritance/simple.rs diff --git a/src/test/ui/traits/trait-inheritance-static.rs b/src/test/ui/traits/inheritance/static.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-static.rs rename to src/test/ui/traits/inheritance/static.rs diff --git a/src/test/ui/traits/trait-inheritance-static2.rs b/src/test/ui/traits/inheritance/static2.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-static2.rs rename to src/test/ui/traits/inheritance/static2.rs diff --git a/src/test/ui/traits/trait-inheritance-subst.rs b/src/test/ui/traits/inheritance/subst.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-subst.rs rename to src/test/ui/traits/inheritance/subst.rs diff --git a/src/test/ui/traits/trait-inheritance-subst2.rs b/src/test/ui/traits/inheritance/subst2.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-subst2.rs rename to src/test/ui/traits/inheritance/subst2.rs diff --git a/src/test/ui/traits/trait-inheritance-visibility.rs b/src/test/ui/traits/inheritance/visibility.rs similarity index 100% rename from src/test/ui/traits/trait-inheritance-visibility.rs rename to src/test/ui/traits/inheritance/visibility.rs diff --git a/src/test/ui/traits/traits-issue-22019.rs b/src/test/ui/traits/issue-22019.rs similarity index 100% rename from src/test/ui/traits/traits-issue-22019.rs rename to src/test/ui/traits/issue-22019.rs diff --git a/src/test/ui/traits/traits-issue-22110.rs b/src/test/ui/traits/issue-22110.rs similarity index 100% rename from src/test/ui/traits/traits-issue-22110.rs rename to src/test/ui/traits/issue-22110.rs diff --git a/src/test/ui/traits/traits-issue-22655.rs b/src/test/ui/traits/issue-22655.rs similarity index 100% rename from src/test/ui/traits/traits-issue-22655.rs rename to src/test/ui/traits/issue-22655.rs diff --git a/src/test/ui/traits/traits-issue-23003-overflow.rs b/src/test/ui/traits/issue-23003-overflow.rs similarity index 100% rename from src/test/ui/traits/traits-issue-23003-overflow.rs rename to src/test/ui/traits/issue-23003-overflow.rs diff --git a/src/test/ui/traits/traits-issue-23003.rs b/src/test/ui/traits/issue-23003.rs similarity index 100% rename from src/test/ui/traits/traits-issue-23003.rs rename to src/test/ui/traits/issue-23003.rs diff --git a/src/test/ui/traits/traits-issue-26339.rs b/src/test/ui/traits/issue-26339.rs similarity index 100% rename from src/test/ui/traits/traits-issue-26339.rs rename to src/test/ui/traits/issue-26339.rs diff --git a/src/test/ui/traits/traits-issue-71136.rs b/src/test/ui/traits/issue-71136.rs similarity index 100% rename from src/test/ui/traits/traits-issue-71136.rs rename to src/test/ui/traits/issue-71136.rs diff --git a/src/test/ui/traits/traits-issue-71136.stderr b/src/test/ui/traits/issue-71136.stderr similarity index 93% rename from src/test/ui/traits/traits-issue-71136.stderr rename to src/test/ui/traits/issue-71136.stderr index 23a8040f6ff..ba47fdb1522 100644 --- a/src/test/ui/traits/traits-issue-71136.stderr +++ b/src/test/ui/traits/issue-71136.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Foo: Clone` is not satisfied - --> $DIR/traits-issue-71136.rs:5:5 + --> $DIR/issue-71136.rs:5:5 | LL | the_foos: Vec, | ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone` diff --git a/src/test/ui/traits/issue-9394-inherited-trait-calls.rs b/src/test/ui/traits/issue-9394-inherited-calls.rs similarity index 100% rename from src/test/ui/traits/issue-9394-inherited-trait-calls.rs rename to src/test/ui/traits/issue-9394-inherited-calls.rs diff --git a/src/test/ui/traits/trait-item-inside-macro.rs b/src/test/ui/traits/item-inside-macro.rs similarity index 100% rename from src/test/ui/traits/trait-item-inside-macro.rs rename to src/test/ui/traits/item-inside-macro.rs diff --git a/src/test/ui/traits/trait-item-privacy.rs b/src/test/ui/traits/item-privacy.rs similarity index 100% rename from src/test/ui/traits/trait-item-privacy.rs rename to src/test/ui/traits/item-privacy.rs diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/item-privacy.stderr similarity index 86% rename from src/test/ui/traits/trait-item-privacy.stderr rename to src/test/ui/traits/item-privacy.stderr index 4d97d934376..6fd82142d61 100644 --- a/src/test/ui/traits/trait-item-privacy.stderr +++ b/src/test/ui/traits/item-privacy.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `a` found for struct `S` in the current scope - --> $DIR/trait-item-privacy.rs:67:7 + --> $DIR/item-privacy.rs:67:7 | LL | struct S; | --------- method `a` not found for this @@ -9,13 +9,13 @@ LL | S.a(); | = help: items from traits can only be used if the trait is implemented and in scope note: `method::A` defines an item `a`, perhaps you need to implement it - --> $DIR/trait-item-privacy.rs:6:5 + --> $DIR/item-privacy.rs:6:5 | LL | trait A { | ^^^^^^^ error[E0599]: no method named `b` found for struct `S` in the current scope - --> $DIR/trait-item-privacy.rs:68:7 + --> $DIR/item-privacy.rs:68:7 | LL | struct S; | --------- method `b` not found for this @@ -30,13 +30,13 @@ LL | use method::B; | error[E0624]: associated function `a` is private - --> $DIR/trait-item-privacy.rs:72:7 + --> $DIR/item-privacy.rs:72:7 | LL | c.a(); | ^ private associated function error[E0599]: no function or associated item named `a` found for struct `S` in the current scope - --> $DIR/trait-item-privacy.rs:78:8 + --> $DIR/item-privacy.rs:78:8 | LL | struct S; | --------- function or associated item `a` not found for this @@ -46,13 +46,13 @@ LL | S::a(&S); | = help: items from traits can only be used if the trait is implemented and in scope note: `method::A` defines an item `a`, perhaps you need to implement it - --> $DIR/trait-item-privacy.rs:6:5 + --> $DIR/item-privacy.rs:6:5 | LL | trait A { | ^^^^^^^ error[E0599]: no function or associated item named `b` found for struct `S` in the current scope - --> $DIR/trait-item-privacy.rs:80:8 + --> $DIR/item-privacy.rs:80:8 | LL | struct S; | --------- function or associated item `b` not found for this @@ -67,13 +67,13 @@ LL | use method::B; | error[E0624]: associated function `a` is private - --> $DIR/trait-item-privacy.rs:84:8 + --> $DIR/item-privacy.rs:84:8 | LL | C::a(&S); | ^ private associated function error[E0599]: no associated item named `A` found for struct `S` in the current scope - --> $DIR/trait-item-privacy.rs:97:8 + --> $DIR/item-privacy.rs:97:8 | LL | struct S; | --------- associated item `A` not found for this @@ -83,13 +83,13 @@ LL | S::A; | = help: items from traits can only be used if the trait is implemented and in scope note: `assoc_const::A` defines an item `A`, perhaps you need to implement it - --> $DIR/trait-item-privacy.rs:24:5 + --> $DIR/item-privacy.rs:24:5 | LL | trait A { | ^^^^^^^ error[E0599]: no associated item named `B` found for struct `S` in the current scope - --> $DIR/trait-item-privacy.rs:98:8 + --> $DIR/item-privacy.rs:98:8 | LL | struct S; | --------- associated item `B` not found for this @@ -104,13 +104,13 @@ LL | use assoc_const::B; | error[E0624]: associated constant `A` is private - --> $DIR/trait-item-privacy.rs:101:8 + --> $DIR/item-privacy.rs:101:8 | LL | C::A; | ^ private associated constant error[E0038]: the trait `assoc_const::C` cannot be made into an object - --> $DIR/trait-item-privacy.rs:101:5 + --> $DIR/item-privacy.rs:101:5 | LL | C::A; | ^^^^ `assoc_const::C` cannot be made into an object @@ -119,7 +119,7 @@ LL | C::A; = help: consider moving `B` to another trait = help: consider moving `A` to another trait note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/trait-item-privacy.rs:25:15 + --> $DIR/item-privacy.rs:25:15 | LL | const A: u8 = 0; | ^ ...because it contains this associated `const` @@ -133,31 +133,31 @@ LL | const C: u8 = 0; | ^ ...because it contains this associated `const` error[E0223]: ambiguous associated type - --> $DIR/trait-item-privacy.rs:115:12 + --> $DIR/item-privacy.rs:115:12 | LL | let _: S::A; | ^^^^ help: use fully-qualified syntax: `::A` error[E0223]: ambiguous associated type - --> $DIR/trait-item-privacy.rs:116:12 + --> $DIR/item-privacy.rs:116:12 | LL | let _: S::B; | ^^^^ help: use fully-qualified syntax: `::B` error[E0223]: ambiguous associated type - --> $DIR/trait-item-privacy.rs:117:12 + --> $DIR/item-privacy.rs:117:12 | LL | let _: S::C; | ^^^^ help: use fully-qualified syntax: `::C` error: associated type `A` is private - --> $DIR/trait-item-privacy.rs:119:12 + --> $DIR/item-privacy.rs:119:12 | LL | let _: T::A; | ^^^^ private associated type error: associated type `A` is private - --> $DIR/trait-item-privacy.rs:128:9 + --> $DIR/item-privacy.rs:128:9 | LL | A = u8, | ^^^^^^ private associated type diff --git a/src/test/ui/traits/kindck-owned-trait-contains-1.rs b/src/test/ui/traits/kindck-owned-contains-1.rs similarity index 100% rename from src/test/ui/traits/kindck-owned-trait-contains-1.rs rename to src/test/ui/traits/kindck-owned-contains-1.rs diff --git a/src/test/ui/traits/trait-matching-lifetimes.rs b/src/test/ui/traits/matching-lifetimes.rs similarity index 100% rename from src/test/ui/traits/trait-matching-lifetimes.rs rename to src/test/ui/traits/matching-lifetimes.rs diff --git a/src/test/ui/traits/trait-matching-lifetimes.stderr b/src/test/ui/traits/matching-lifetimes.stderr similarity index 80% rename from src/test/ui/traits/trait-matching-lifetimes.stderr rename to src/test/ui/traits/matching-lifetimes.stderr index 17ebdb7c825..5c28d40160d 100644 --- a/src/test/ui/traits/trait-matching-lifetimes.stderr +++ b/src/test/ui/traits/matching-lifetimes.stderr @@ -1,5 +1,5 @@ error[E0308]: method not compatible with trait - --> $DIR/trait-matching-lifetimes.rs:14:5 + --> $DIR/matching-lifetimes.rs:14:5 | LL | fn foo(x: Foo<'b,'a>) { | ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch @@ -7,18 +7,18 @@ LL | fn foo(x: Foo<'b,'a>) { = note: expected fn pointer `fn(Foo<'a, 'b>)` found fn pointer `fn(Foo<'b, 'a>)` note: the lifetime `'b` as defined on the impl at 13:9... - --> $DIR/trait-matching-lifetimes.rs:13:9 + --> $DIR/matching-lifetimes.rs:13:9 | LL | impl<'a,'b> Tr for Foo<'a,'b> { | ^^ note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 13:6 - --> $DIR/trait-matching-lifetimes.rs:13:6 + --> $DIR/matching-lifetimes.rs:13:6 | LL | impl<'a,'b> Tr for Foo<'a,'b> { | ^^ error[E0308]: method not compatible with trait - --> $DIR/trait-matching-lifetimes.rs:14:5 + --> $DIR/matching-lifetimes.rs:14:5 | LL | fn foo(x: Foo<'b,'a>) { | ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch @@ -26,12 +26,12 @@ LL | fn foo(x: Foo<'b,'a>) { = note: expected fn pointer `fn(Foo<'a, 'b>)` found fn pointer `fn(Foo<'b, 'a>)` note: the lifetime `'a` as defined on the impl at 13:6... - --> $DIR/trait-matching-lifetimes.rs:13:6 + --> $DIR/matching-lifetimes.rs:13:6 | LL | impl<'a,'b> Tr for Foo<'a,'b> { | ^^ note: ...does not necessarily outlive the lifetime `'b` as defined on the impl at 13:9 - --> $DIR/trait-matching-lifetimes.rs:13:9 + --> $DIR/matching-lifetimes.rs:13:9 | LL | impl<'a,'b> Tr for Foo<'a,'b> { | ^^ diff --git a/src/test/ui/traits/trait-method-private.rs b/src/test/ui/traits/method-private.rs similarity index 100% rename from src/test/ui/traits/trait-method-private.rs rename to src/test/ui/traits/method-private.rs diff --git a/src/test/ui/traits/trait-method-private.stderr b/src/test/ui/traits/method-private.stderr similarity index 91% rename from src/test/ui/traits/trait-method-private.stderr rename to src/test/ui/traits/method-private.stderr index c33673aea4d..99f330b38ae 100644 --- a/src/test/ui/traits/trait-method-private.stderr +++ b/src/test/ui/traits/method-private.stderr @@ -1,5 +1,5 @@ error[E0624]: associated function `method` is private - --> $DIR/trait-method-private.rs:19:9 + --> $DIR/method-private.rs:19:9 | LL | foo.method(); | ^^^^^^ private associated function diff --git a/src/test/ui/traits/traits-multidispatch-bad.rs b/src/test/ui/traits/multidispatch-bad.rs similarity index 100% rename from src/test/ui/traits/traits-multidispatch-bad.rs rename to src/test/ui/traits/multidispatch-bad.rs diff --git a/src/test/ui/traits/traits-multidispatch-bad.stderr b/src/test/ui/traits/multidispatch-bad.stderr similarity index 88% rename from src/test/ui/traits/traits-multidispatch-bad.stderr rename to src/test/ui/traits/multidispatch-bad.stderr index 671faf45178..8d4813c453e 100644 --- a/src/test/ui/traits/traits-multidispatch-bad.stderr +++ b/src/test/ui/traits/multidispatch-bad.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/traits-multidispatch-bad.rs:19:17 + --> $DIR/multidispatch-bad.rs:19:17 | LL | test(22i32, 44i32); | ^^^^^ expected `u32`, found `i32` diff --git a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.rs b/src/test/ui/traits/multidispatch-convert-ambig-dest.rs similarity index 100% rename from src/test/ui/traits/traits-multidispatch-convert-ambig-dest.rs rename to src/test/ui/traits/multidispatch-convert-ambig-dest.rs diff --git a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.stderr b/src/test/ui/traits/multidispatch-convert-ambig-dest.stderr similarity index 83% rename from src/test/ui/traits/traits-multidispatch-convert-ambig-dest.stderr rename to src/test/ui/traits/multidispatch-convert-ambig-dest.stderr index 338c8cbf2e4..62f5f5aaa88 100644 --- a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.stderr +++ b/src/test/ui/traits/multidispatch-convert-ambig-dest.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/traits-multidispatch-convert-ambig-dest.rs:26:5 + --> $DIR/multidispatch-convert-ambig-dest.rs:26:5 | LL | test(22, std::default::Default::default()); | ^^^^ cannot infer type for type parameter `U` declared on the function `test` diff --git a/src/test/ui/traits/traits-multidispatch-infer-convert-target.rs b/src/test/ui/traits/multidispatch-infer-convert-target.rs similarity index 100% rename from src/test/ui/traits/traits-multidispatch-infer-convert-target.rs rename to src/test/ui/traits/multidispatch-infer-convert-target.rs diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs b/src/test/ui/traits/object/auto-dedup-in-impl.rs similarity index 100% rename from src/test/ui/traits/trait-object-auto-dedup-in-impl.rs rename to src/test/ui/traits/object/auto-dedup-in-impl.rs diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr b/src/test/ui/traits/object/auto-dedup-in-impl.stderr similarity index 87% rename from src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr rename to src/test/ui/traits/object/auto-dedup-in-impl.stderr index d10e58629cc..5f13c781341 100644 --- a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr +++ b/src/test/ui/traits/object/auto-dedup-in-impl.stderr @@ -1,5 +1,5 @@ error[E0592]: duplicate definitions with name `test` - --> $DIR/trait-object-auto-dedup-in-impl.rs:14:5 + --> $DIR/auto-dedup-in-impl.rs:14:5 | LL | fn test(&self) { println!("one"); } | ^^^^^^^^^^^^^^ duplicate definitions for `test` diff --git a/src/test/ui/traits/trait-object-auto-dedup.rs b/src/test/ui/traits/object/auto-dedup.rs similarity index 100% rename from src/test/ui/traits/trait-object-auto-dedup.rs rename to src/test/ui/traits/object/auto-dedup.rs diff --git a/src/test/ui/traits/trait-object-bounds-cycle-1.rs b/src/test/ui/traits/object/bounds-cycle-1.rs similarity index 100% rename from src/test/ui/traits/trait-object-bounds-cycle-1.rs rename to src/test/ui/traits/object/bounds-cycle-1.rs diff --git a/src/test/ui/traits/trait-object-bounds-cycle-2.rs b/src/test/ui/traits/object/bounds-cycle-2.rs similarity index 100% rename from src/test/ui/traits/trait-object-bounds-cycle-2.rs rename to src/test/ui/traits/object/bounds-cycle-2.rs diff --git a/src/test/ui/traits/trait-object-bounds-cycle-3.rs b/src/test/ui/traits/object/bounds-cycle-3.rs similarity index 100% rename from src/test/ui/traits/trait-object-bounds-cycle-3.rs rename to src/test/ui/traits/object/bounds-cycle-3.rs diff --git a/src/test/ui/traits/trait-object-bounds-cycle-4.rs b/src/test/ui/traits/object/bounds-cycle-4.rs similarity index 100% rename from src/test/ui/traits/trait-object-bounds-cycle-4.rs rename to src/test/ui/traits/object/bounds-cycle-4.rs diff --git a/src/test/ui/traits/trait-object-exclusion.rs b/src/test/ui/traits/object/exclusion.rs similarity index 100% rename from src/test/ui/traits/trait-object-exclusion.rs rename to src/test/ui/traits/object/exclusion.rs diff --git a/src/test/ui/traits/trait-object-generics.rs b/src/test/ui/traits/object/generics.rs similarity index 100% rename from src/test/ui/traits/trait-object-generics.rs rename to src/test/ui/traits/object/generics.rs diff --git a/src/test/ui/traits/trait-object-lifetime-first.rs b/src/test/ui/traits/object/lifetime-first.rs similarity index 100% rename from src/test/ui/traits/trait-object-lifetime-first.rs rename to src/test/ui/traits/object/lifetime-first.rs diff --git a/src/test/ui/traits/trait-object-macro-matcher.rs b/src/test/ui/traits/object/macro-matcher.rs similarity index 100% rename from src/test/ui/traits/trait-object-macro-matcher.rs rename to src/test/ui/traits/object/macro-matcher.rs diff --git a/src/test/ui/traits/trait-object-macro-matcher.stderr b/src/test/ui/traits/object/macro-matcher.stderr similarity index 89% rename from src/test/ui/traits/trait-object-macro-matcher.stderr rename to src/test/ui/traits/object/macro-matcher.stderr index 335eeb8f151..6d1e236c048 100644 --- a/src/test/ui/traits/trait-object-macro-matcher.stderr +++ b/src/test/ui/traits/object/macro-matcher.stderr @@ -1,11 +1,11 @@ error[E0224]: at least one trait is required for an object type - --> $DIR/trait-object-macro-matcher.rs:11:8 + --> $DIR/macro-matcher.rs:11:8 | LL | m!(dyn 'static +); | ^^^^^^^^^^^^^ error[E0038]: the trait `Copy` cannot be made into an object - --> $DIR/trait-object-macro-matcher.rs:8:8 + --> $DIR/macro-matcher.rs:8:8 | LL | m!(dyn Copy + Send + 'static); | ^^^^^^^^^^^^^^^^^^^^^^^^^ `Copy` cannot be made into an object diff --git a/src/test/ui/traits/trait-object-safety.rs b/src/test/ui/traits/object/safety.rs similarity index 100% rename from src/test/ui/traits/trait-object-safety.rs rename to src/test/ui/traits/object/safety.rs diff --git a/src/test/ui/traits/trait-object-safety.stderr b/src/test/ui/traits/object/safety.stderr similarity index 92% rename from src/test/ui/traits/trait-object-safety.stderr rename to src/test/ui/traits/object/safety.stderr index 16f60962cc1..6784689072e 100644 --- a/src/test/ui/traits/trait-object-safety.stderr +++ b/src/test/ui/traits/object/safety.stderr @@ -1,11 +1,11 @@ error[E0038]: the trait `Tr` cannot be made into an object - --> $DIR/trait-object-safety.rs:15:22 + --> $DIR/safety.rs:15:22 | LL | let _: &dyn Tr = &St; | ^^^ `Tr` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/trait-object-safety.rs:4:8 + --> $DIR/safety.rs:4:8 | LL | trait Tr { | -- this trait cannot be made into an object... @@ -23,13 +23,13 @@ LL | fn foo() where Self: Sized; | ^^^^^^^^^^^^^^^^^ error[E0038]: the trait `Tr` cannot be made into an object - --> $DIR/trait-object-safety.rs:15:12 + --> $DIR/safety.rs:15:12 | LL | let _: &dyn Tr = &St; | ^^^^^^^ `Tr` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/trait-object-safety.rs:4:8 + --> $DIR/safety.rs:4:8 | LL | trait Tr { | -- this trait cannot be made into an object... diff --git a/src/test/ui/traits/trait-object-supertrait-lifetime-bound.rs b/src/test/ui/traits/object/supertrait-lifetime-bound.rs similarity index 100% rename from src/test/ui/traits/trait-object-supertrait-lifetime-bound.rs rename to src/test/ui/traits/object/supertrait-lifetime-bound.rs diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.rs b/src/test/ui/traits/object/vs-lifetime-2.rs similarity index 100% rename from src/test/ui/traits/trait-object-vs-lifetime-2.rs rename to src/test/ui/traits/object/vs-lifetime-2.rs diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr b/src/test/ui/traits/object/vs-lifetime-2.stderr similarity index 84% rename from src/test/ui/traits/trait-object-vs-lifetime-2.stderr rename to src/test/ui/traits/object/vs-lifetime-2.stderr index 28b8e11f133..9b8e793dfd2 100644 --- a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr +++ b/src/test/ui/traits/object/vs-lifetime-2.stderr @@ -1,5 +1,5 @@ error[E0224]: at least one trait is required for an object type - --> $DIR/trait-object-vs-lifetime-2.rs:7:5 + --> $DIR/vs-lifetime-2.rs:7:5 | LL | dyn 'static +: 'static + Copy, | ^^^^^^^^^^^^^ diff --git a/src/test/ui/traits/trait-object-vs-lifetime.rs b/src/test/ui/traits/object/vs-lifetime.rs similarity index 100% rename from src/test/ui/traits/trait-object-vs-lifetime.rs rename to src/test/ui/traits/object/vs-lifetime.rs diff --git a/src/test/ui/traits/trait-object-vs-lifetime.stderr b/src/test/ui/traits/object/vs-lifetime.stderr similarity index 81% rename from src/test/ui/traits/trait-object-vs-lifetime.stderr rename to src/test/ui/traits/object/vs-lifetime.stderr index 620c816d6d9..6673472e4a9 100644 --- a/src/test/ui/traits/trait-object-vs-lifetime.stderr +++ b/src/test/ui/traits/object/vs-lifetime.stderr @@ -1,11 +1,11 @@ error[E0224]: at least one trait is required for an object type - --> $DIR/trait-object-vs-lifetime.rs:9:23 + --> $DIR/vs-lifetime.rs:9:23 | LL | let _: S<'static, dyn 'static +>; | ^^^^^^^^^^^^^ error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied - --> $DIR/trait-object-vs-lifetime.rs:11:12 + --> $DIR/vs-lifetime.rs:11:12 | LL | let _: S<'static, 'static>; | ^ --------- help: remove this lifetime argument @@ -13,19 +13,19 @@ LL | let _: S<'static, 'static>; | expected 1 lifetime argument | note: struct defined here, with 1 lifetime parameter: `'a` - --> $DIR/trait-object-vs-lifetime.rs:4:8 + --> $DIR/vs-lifetime.rs:4:8 | LL | struct S<'a, T>(&'a u8, T); | ^ -- error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied - --> $DIR/trait-object-vs-lifetime.rs:11:12 + --> $DIR/vs-lifetime.rs:11:12 | LL | let _: S<'static, 'static>; | ^ expected 1 type argument | note: struct defined here, with 1 type parameter: `T` - --> $DIR/trait-object-vs-lifetime.rs:4:8 + --> $DIR/vs-lifetime.rs:4:8 | LL | struct S<'a, T>(&'a u8, T); | ^ - @@ -35,13 +35,13 @@ LL | let _: S<'static, 'static, T>; | ^^^ error[E0224]: at least one trait is required for an object type - --> $DIR/trait-object-vs-lifetime.rs:14:14 + --> $DIR/vs-lifetime.rs:14:14 | LL | let _: S; | ^^^^^^^^^^^^^ error[E0747]: type provided when a lifetime was expected - --> $DIR/trait-object-vs-lifetime.rs:14:14 + --> $DIR/vs-lifetime.rs:14:14 | LL | let _: S; | ^^^^^^^^^^^^^ diff --git a/src/test/ui/traits/trait-object-with-lifetime-bound.rs b/src/test/ui/traits/object/with-lifetime-bound.rs similarity index 100% rename from src/test/ui/traits/trait-object-with-lifetime-bound.rs rename to src/test/ui/traits/object/with-lifetime-bound.rs diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.rs b/src/test/ui/traits/object/with-self-in-projection-output-bad.rs similarity index 100% rename from src/test/ui/traits/trait-object-with-self-in-projection-output-bad.rs rename to src/test/ui/traits/object/with-self-in-projection-output-bad.rs diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.stderr b/src/test/ui/traits/object/with-self-in-projection-output-bad.stderr similarity index 86% rename from src/test/ui/traits/trait-object-with-self-in-projection-output-bad.stderr rename to src/test/ui/traits/object/with-self-in-projection-output-bad.stderr index 79eb27e101a..45978a84068 100644 --- a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.stderr +++ b/src/test/ui/traits/object/with-self-in-projection-output-bad.stderr @@ -1,5 +1,5 @@ error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified - --> $DIR/trait-object-with-self-in-projection-output-bad.rs:45:21 + --> $DIR/with-self-in-projection-output-bad.rs:45:21 | LL | type Output; | ------------ `Output` defined here @@ -8,7 +8,7 @@ LL | let _x: Box> = Box::new(2u32); | ^^^^^^^^^^^^^^^^^^ help: specify the associated type: `Helper` error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified - --> $DIR/trait-object-with-self-in-projection-output-bad.rs:48:21 + --> $DIR/with-self-in-projection-output-bad.rs:48:21 | LL | type Output; | ------------ `Output` defined here diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs b/src/test/ui/traits/object/with-self-in-projection-output-good.rs similarity index 100% rename from src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs rename to src/test/ui/traits/object/with-self-in-projection-output-good.rs diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs b/src/test/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs similarity index 100% rename from src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs rename to src/test/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs diff --git a/src/test/ui/traits/trait-param-without-lifetime-constraint.rs b/src/test/ui/traits/param-without-lifetime-constraint.rs similarity index 100% rename from src/test/ui/traits/trait-param-without-lifetime-constraint.rs rename to src/test/ui/traits/param-without-lifetime-constraint.rs diff --git a/src/test/ui/traits/trait-param-without-lifetime-constraint.stderr b/src/test/ui/traits/param-without-lifetime-constraint.stderr similarity index 85% rename from src/test/ui/traits/trait-param-without-lifetime-constraint.stderr rename to src/test/ui/traits/param-without-lifetime-constraint.stderr index 4942dbe480b..763fb5186cc 100644 --- a/src/test/ui/traits/trait-param-without-lifetime-constraint.stderr +++ b/src/test/ui/traits/param-without-lifetime-constraint.stderr @@ -1,5 +1,5 @@ error: `impl` item signature doesn't match `trait` item signature - --> $DIR/trait-param-without-lifetime-constraint.rs:14:5 + --> $DIR/param-without-lifetime-constraint.rs:14:5 | LL | fn get_relation(&self) -> To; | ----------------------------- expected `fn(&Article) -> &ProofReader` @@ -10,7 +10,7 @@ LL | fn get_relation(&self) -> &ProofReader { = note: expected `fn(&Article) -> &ProofReader` found `fn(&Article) -> &ProofReader` help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` - --> $DIR/trait-param-without-lifetime-constraint.rs:10:31 + --> $DIR/param-without-lifetime-constraint.rs:10:31 | LL | fn get_relation(&self) -> To; | ^^ consider borrowing this type parameter in the trait diff --git a/src/test/ui/traits/parameterized-trait-with-bounds.rs b/src/test/ui/traits/parameterized-with-bounds.rs similarity index 100% rename from src/test/ui/traits/parameterized-trait-with-bounds.rs rename to src/test/ui/traits/parameterized-with-bounds.rs diff --git a/src/test/ui/traits/principal-less-trait-objects.rs b/src/test/ui/traits/principal-less-objects.rs similarity index 100% rename from src/test/ui/traits/principal-less-trait-objects.rs rename to src/test/ui/traits/principal-less-objects.rs diff --git a/src/test/ui/traits/trait-privacy.rs b/src/test/ui/traits/privacy.rs similarity index 100% rename from src/test/ui/traits/trait-privacy.rs rename to src/test/ui/traits/privacy.rs diff --git a/src/test/ui/traits/trait-region-pointer-simple.rs b/src/test/ui/traits/region-pointer-simple.rs similarity index 100% rename from src/test/ui/traits/trait-region-pointer-simple.rs rename to src/test/ui/traits/region-pointer-simple.rs diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs b/src/test/ui/traits/reservation-impl/coherence-conflict.rs similarity index 100% rename from src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs rename to src/test/ui/traits/reservation-impl/coherence-conflict.rs diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.stderr b/src/test/ui/traits/reservation-impl/coherence-conflict.stderr similarity index 88% rename from src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.stderr rename to src/test/ui/traits/reservation-impl/coherence-conflict.stderr index d76d3a91c8d..1a227a85c06 100644 --- a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.stderr +++ b/src/test/ui/traits/reservation-impl/coherence-conflict.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `OtherTrait` for type `()`: - --> $DIR/reservation-impl-coherence-conflict.rs:11:1 + --> $DIR/coherence-conflict.rs:11:1 | LL | impl OtherTrait for () {} | ---------------------- first implementation here diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.rs b/src/test/ui/traits/reservation-impl/no-use.rs similarity index 100% rename from src/test/ui/traits/reservation-impls/reservation-impl-no-use.rs rename to src/test/ui/traits/reservation-impl/no-use.rs diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.stderr b/src/test/ui/traits/reservation-impl/no-use.stderr similarity index 91% rename from src/test/ui/traits/reservation-impls/reservation-impl-no-use.stderr rename to src/test/ui/traits/reservation-impl/no-use.stderr index 794faff8848..fb4a443435f 100644 --- a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.stderr +++ b/src/test/ui/traits/reservation-impl/no-use.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `(): MyTrait` is not satisfied - --> $DIR/reservation-impl-no-use.rs:10:26 + --> $DIR/no-use.rs:10:26 | LL | trait MyTrait { fn foo(&self); } | -------------- required by `MyTrait::foo` diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs similarity index 100% rename from src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs rename to src/test/ui/traits/reservation-impl/non-lattice-ok.rs diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-ok.rs b/src/test/ui/traits/reservation-impl/ok.rs similarity index 100% rename from src/test/ui/traits/reservation-impls/reservation-impl-ok.rs rename to src/test/ui/traits/reservation-impl/ok.rs diff --git a/src/test/ui/traits/trait-resolution-in-overloaded-op.rs b/src/test/ui/traits/resolution-in-overloaded-op.rs similarity index 100% rename from src/test/ui/traits/trait-resolution-in-overloaded-op.rs rename to src/test/ui/traits/resolution-in-overloaded-op.rs diff --git a/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr b/src/test/ui/traits/resolution-in-overloaded-op.stderr similarity index 88% rename from src/test/ui/traits/trait-resolution-in-overloaded-op.stderr rename to src/test/ui/traits/resolution-in-overloaded-op.stderr index ada76cd8b77..6a641ed214d 100644 --- a/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr +++ b/src/test/ui/traits/resolution-in-overloaded-op.stderr @@ -1,5 +1,5 @@ error[E0369]: cannot multiply `&T` by `f64` - --> $DIR/trait-resolution-in-overloaded-op.rs:8:7 + --> $DIR/resolution-in-overloaded-op.rs:8:7 | LL | a * b | - ^ - f64 diff --git a/src/test/ui/traits/trait-safety-fn-body.rs b/src/test/ui/traits/safety-fn-body.rs similarity index 100% rename from src/test/ui/traits/trait-safety-fn-body.rs rename to src/test/ui/traits/safety-fn-body.rs diff --git a/src/test/ui/traits/trait-safety-fn-body.stderr b/src/test/ui/traits/safety-fn-body.stderr similarity index 91% rename from src/test/ui/traits/trait-safety-fn-body.stderr rename to src/test/ui/traits/safety-fn-body.stderr index a27cd869da5..4f784a020d9 100644 --- a/src/test/ui/traits/trait-safety-fn-body.stderr +++ b/src/test/ui/traits/safety-fn-body.stderr @@ -1,5 +1,5 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block - --> $DIR/trait-safety-fn-body.rs:11:9 + --> $DIR/safety-fn-body.rs:11:9 | LL | *self += 1; | ^^^^^^^^^^ dereference of raw pointer diff --git a/src/test/ui/traits/trait-safety-inherent-impl.rs b/src/test/ui/traits/safety-inherent-impl.rs similarity index 100% rename from src/test/ui/traits/trait-safety-inherent-impl.rs rename to src/test/ui/traits/safety-inherent-impl.rs diff --git a/src/test/ui/traits/trait-safety-inherent-impl.stderr b/src/test/ui/traits/safety-inherent-impl.stderr similarity index 85% rename from src/test/ui/traits/trait-safety-inherent-impl.stderr rename to src/test/ui/traits/safety-inherent-impl.stderr index 0738d2973e2..1c8f43feca4 100644 --- a/src/test/ui/traits/trait-safety-inherent-impl.stderr +++ b/src/test/ui/traits/safety-inherent-impl.stderr @@ -1,5 +1,5 @@ error[E0197]: inherent impls cannot be unsafe - --> $DIR/trait-safety-inherent-impl.rs:5:13 + --> $DIR/safety-inherent-impl.rs:5:13 | LL | unsafe impl SomeStruct { | ------ ^^^^^^^^^^ inherent impl for this type diff --git a/src/test/ui/traits/trait-safety-ok-cc.rs b/src/test/ui/traits/safety-ok-cc.rs similarity index 100% rename from src/test/ui/traits/trait-safety-ok-cc.rs rename to src/test/ui/traits/safety-ok-cc.rs diff --git a/src/test/ui/traits/trait-safety-ok.rs b/src/test/ui/traits/safety-ok.rs similarity index 100% rename from src/test/ui/traits/trait-safety-ok.rs rename to src/test/ui/traits/safety-ok.rs diff --git a/src/test/ui/traits/trait-safety-trait-impl-cc.rs b/src/test/ui/traits/safety-trait-impl-cc.rs similarity index 100% rename from src/test/ui/traits/trait-safety-trait-impl-cc.rs rename to src/test/ui/traits/safety-trait-impl-cc.rs diff --git a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr b/src/test/ui/traits/safety-trait-impl-cc.stderr similarity index 87% rename from src/test/ui/traits/trait-safety-trait-impl-cc.stderr rename to src/test/ui/traits/safety-trait-impl-cc.stderr index 2fcedc5cc52..5a0f8d3b8ca 100644 --- a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr +++ b/src/test/ui/traits/safety-trait-impl-cc.stderr @@ -1,5 +1,5 @@ error[E0200]: the trait `Foo` requires an `unsafe impl` declaration - --> $DIR/trait-safety-trait-impl-cc.rs:9:1 + --> $DIR/safety-trait-impl-cc.rs:9:1 | LL | / impl lib::Foo for Bar { LL | | fn foo(&self) -> isize { diff --git a/src/test/ui/traits/trait-safety-trait-impl.rs b/src/test/ui/traits/safety-trait-impl.rs similarity index 100% rename from src/test/ui/traits/trait-safety-trait-impl.rs rename to src/test/ui/traits/safety-trait-impl.rs diff --git a/src/test/ui/traits/trait-safety-trait-impl.stderr b/src/test/ui/traits/safety-trait-impl.stderr similarity index 84% rename from src/test/ui/traits/trait-safety-trait-impl.stderr rename to src/test/ui/traits/safety-trait-impl.stderr index 5b29fd12ab5..fc0f6c69308 100644 --- a/src/test/ui/traits/trait-safety-trait-impl.stderr +++ b/src/test/ui/traits/safety-trait-impl.stderr @@ -1,11 +1,11 @@ error[E0200]: the trait `UnsafeTrait` requires an `unsafe impl` declaration - --> $DIR/trait-safety-trait-impl.rs:14:1 + --> $DIR/safety-trait-impl.rs:14:1 | LL | impl UnsafeTrait for u16 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0199]: implementing the trait `SafeTrait` is not unsafe - --> $DIR/trait-safety-trait-impl.rs:16:1 + --> $DIR/safety-trait-impl.rs:16:1 | LL | unsafe impl SafeTrait for u32 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/traits/trait-static-method-generic-inference.rs b/src/test/ui/traits/static-method-generic-inference.rs similarity index 100% rename from src/test/ui/traits/trait-static-method-generic-inference.rs rename to src/test/ui/traits/static-method-generic-inference.rs diff --git a/src/test/ui/traits/trait-static-method-generic-inference.stderr b/src/test/ui/traits/static-method-generic-inference.stderr similarity index 87% rename from src/test/ui/traits/trait-static-method-generic-inference.stderr rename to src/test/ui/traits/static-method-generic-inference.stderr index 6a7e8f59d87..2b9ce7321ee 100644 --- a/src/test/ui/traits/trait-static-method-generic-inference.stderr +++ b/src/test/ui/traits/static-method-generic-inference.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations needed - --> $DIR/trait-static-method-generic-inference.rs:24:25 + --> $DIR/static-method-generic-inference.rs:24:25 | LL | fn new() -> T; | -------------- required by `HasNew::new` diff --git a/src/test/ui/traits/trait-static-method-overwriting.rs b/src/test/ui/traits/static-method-overwriting.rs similarity index 100% rename from src/test/ui/traits/trait-static-method-overwriting.rs rename to src/test/ui/traits/static-method-overwriting.rs diff --git a/src/test/ui/traits/traits-static-outlives-a-where-clause.rs b/src/test/ui/traits/static-outlives-a-where-clause.rs similarity index 100% rename from src/test/ui/traits/traits-static-outlives-a-where-clause.rs rename to src/test/ui/traits/static-outlives-a-where-clause.rs diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed b/src/test/ui/traits/suggest-deferences/issue-39029.fixed similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed rename to src/test/ui/traits/suggest-deferences/issue-39029.fixed diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs b/src/test/ui/traits/suggest-deferences/issue-39029.rs similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-issue-39029.rs rename to src/test/ui/traits/suggest-deferences/issue-39029.rs diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr b/src/test/ui/traits/suggest-deferences/issue-39029.stderr similarity index 93% rename from src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr rename to src/test/ui/traits/suggest-deferences/issue-39029.stderr index 4273b8e3f3e..1005231d396 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr +++ b/src/test/ui/traits/suggest-deferences/issue-39029.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied - --> $DIR/trait-suggest-deferences-issue-39029.rs:16:37 + --> $DIR/issue-39029.rs:16:37 | LL | let _errors = TcpListener::bind(&bad); | ^^^^ diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed b/src/test/ui/traits/suggest-deferences/issue-62530.fixed similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed rename to src/test/ui/traits/suggest-deferences/issue-62530.fixed diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs b/src/test/ui/traits/suggest-deferences/issue-62530.rs similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-issue-62530.rs rename to src/test/ui/traits/suggest-deferences/issue-62530.rs diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr b/src/test/ui/traits/suggest-deferences/issue-62530.stderr similarity index 91% rename from src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr rename to src/test/ui/traits/suggest-deferences/issue-62530.stderr index eaec87d01da..4f1165b17c5 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr +++ b/src/test/ui/traits/suggest-deferences/issue-62530.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&String: SomeTrait` is not satisfied - --> $DIR/trait-suggest-deferences-issue-62530.rs:13:26 + --> $DIR/issue-62530.rs:13:26 | LL | fn takes_type_parameter(_x: T) where T: SomeTrait {} | --------- required by this bound in `takes_type_parameter` diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-0.fixed b/src/test/ui/traits/suggest-deferences/multiple-0.fixed similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-multiple-0.fixed rename to src/test/ui/traits/suggest-deferences/multiple-0.fixed diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-0.rs b/src/test/ui/traits/suggest-deferences/multiple-0.rs similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-multiple-0.rs rename to src/test/ui/traits/suggest-deferences/multiple-0.rs diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-0.stderr b/src/test/ui/traits/suggest-deferences/multiple-0.stderr similarity index 89% rename from src/test/ui/traits/trait-suggest-deferences-multiple-0.stderr rename to src/test/ui/traits/suggest-deferences/multiple-0.stderr index add34a553bc..f76c73cbb63 100644 --- a/src/test/ui/traits/trait-suggest-deferences-multiple-0.stderr +++ b/src/test/ui/traits/suggest-deferences/multiple-0.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&Baz: Happy` is not satisfied - --> $DIR/trait-suggest-deferences-multiple-0.rs:34:9 + --> $DIR/multiple-0.rs:34:9 | LL | fn foo(_: T) where T: Happy {} | ----- required by this bound in `foo` diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-1.rs b/src/test/ui/traits/suggest-deferences/multiple-1.rs similarity index 100% rename from src/test/ui/traits/trait-suggest-deferences-multiple-1.rs rename to src/test/ui/traits/suggest-deferences/multiple-1.rs diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-1.stderr b/src/test/ui/traits/suggest-deferences/multiple-1.stderr similarity index 87% rename from src/test/ui/traits/trait-suggest-deferences-multiple-1.stderr rename to src/test/ui/traits/suggest-deferences/multiple-1.stderr index e90278fa16f..f98cc54227f 100644 --- a/src/test/ui/traits/trait-suggest-deferences-multiple-1.stderr +++ b/src/test/ui/traits/suggest-deferences/multiple-1.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&mut Baz: Happy` is not satisfied - --> $DIR/trait-suggest-deferences-multiple-1.rs:52:9 + --> $DIR/multiple-1.rs:52:9 | LL | fn foo(_: T) where T: Happy {} | ----- required by this bound in `foo` diff --git a/src/test/ui/traits/trait-suggest-where-clause.rs b/src/test/ui/traits/suggest-where-clause.rs similarity index 100% rename from src/test/ui/traits/trait-suggest-where-clause.rs rename to src/test/ui/traits/suggest-where-clause.rs diff --git a/src/test/ui/traits/trait-suggest-where-clause.stderr b/src/test/ui/traits/suggest-where-clause.stderr similarity index 89% rename from src/test/ui/traits/trait-suggest-where-clause.stderr rename to src/test/ui/traits/suggest-where-clause.stderr index 0f6f8d75c5e..b50017afa4d 100644 --- a/src/test/ui/traits/trait-suggest-where-clause.stderr +++ b/src/test/ui/traits/suggest-where-clause.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `U` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:7:20 + --> $DIR/suggest-where-clause.rs:7:20 | LL | fn check() { | - this type parameter needs to be `Sized` @@ -13,7 +13,7 @@ LL | pub const fn size_of() -> usize { | - required by this bound in `std::mem::size_of` error[E0277]: the size for values of type `U` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:10:5 + --> $DIR/suggest-where-clause.rs:10:5 | LL | fn check() { | - this type parameter needs to be `Sized` @@ -29,7 +29,7 @@ LL | pub const fn size_of() -> usize { = note: required because it appears within the type `Misc` error[E0277]: the trait bound `u64: From` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:15:5 + --> $DIR/suggest-where-clause.rs:15:5 | LL | >::from; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `From` is not implemented for `u64` @@ -37,7 +37,7 @@ LL | >::from; = note: required by `from` error[E0277]: the trait bound `u64: From<::Item>` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:18:5 + --> $DIR/suggest-where-clause.rs:18:5 | LL | ::Item>>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<::Item>` is not implemented for `u64` @@ -45,7 +45,7 @@ LL | ::Item>>::from; = note: required by `from` error[E0277]: the trait bound `Misc<_>: From` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:23:5 + --> $DIR/suggest-where-clause.rs:23:5 | LL | as From>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From` is not implemented for `Misc<_>` @@ -53,7 +53,7 @@ LL | as From>::from; = note: required by `from` error[E0277]: the size for values of type `[T]` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:28:20 + --> $DIR/suggest-where-clause.rs:28:20 | LL | mem::size_of::<[T]>(); | ^^^ doesn't have a size known at compile-time @@ -66,7 +66,7 @@ LL | pub const fn size_of() -> usize { = help: the trait `Sized` is not implemented for `[T]` error[E0277]: the size for values of type `[&U]` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:31:5 + --> $DIR/suggest-where-clause.rs:31:5 | LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/traits/supertrait-default-generics.rs b/src/test/ui/traits/superdefault-generics.rs similarity index 100% rename from src/test/ui/traits/supertrait-default-generics.rs rename to src/test/ui/traits/superdefault-generics.rs diff --git a/src/test/ui/traits/syntax-trait-polarity.rs b/src/test/ui/traits/syntax-polarity.rs similarity index 100% rename from src/test/ui/traits/syntax-trait-polarity.rs rename to src/test/ui/traits/syntax-polarity.rs diff --git a/src/test/ui/traits/trait-test-2.rs b/src/test/ui/traits/test-2.rs similarity index 100% rename from src/test/ui/traits/trait-test-2.rs rename to src/test/ui/traits/test-2.rs diff --git a/src/test/ui/traits/trait-test-2.stderr b/src/test/ui/traits/test-2.stderr similarity index 91% rename from src/test/ui/traits/trait-test-2.stderr rename to src/test/ui/traits/test-2.stderr index a38d3387c8d..12b55c3a4fd 100644 --- a/src/test/ui/traits/trait-test-2.stderr +++ b/src/test/ui/traits/test-2.stderr @@ -1,5 +1,5 @@ error[E0107]: this associated function takes 0 type arguments but 1 type argument was supplied - --> $DIR/trait-test-2.rs:9:8 + --> $DIR/test-2.rs:9:8 | LL | 10.dup::(); | ^^^------- help: remove these generics @@ -7,13 +7,13 @@ LL | 10.dup::(); | expected 0 type arguments | note: associated function defined here, with 0 type parameters - --> $DIR/trait-test-2.rs:4:16 + --> $DIR/test-2.rs:4:16 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } | ^^^ error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied - --> $DIR/trait-test-2.rs:11:8 + --> $DIR/test-2.rs:11:8 | LL | 10.blah::(); | ^^^^ ----- help: remove this type argument @@ -21,13 +21,13 @@ LL | 10.blah::(); | expected 1 type argument | note: associated function defined here, with 1 type parameter: `X` - --> $DIR/trait-test-2.rs:4:39 + --> $DIR/test-2.rs:4:39 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } | ^^^^ - error[E0038]: the trait `bar` cannot be made into an object - --> $DIR/trait-test-2.rs:13:16 + --> $DIR/test-2.rs:13:16 | LL | (box 10 as Box).dup(); | ^^^^^^^^^^^^ `bar` cannot be made into an object @@ -35,7 +35,7 @@ LL | (box 10 as Box).dup(); = help: consider moving `dup` to another trait = help: consider moving `blah` to another trait note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/trait-test-2.rs:4:30 + --> $DIR/test-2.rs:4:30 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters @@ -44,7 +44,7 @@ LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } | this trait cannot be made into an object... error[E0038]: the trait `bar` cannot be made into an object - --> $DIR/trait-test-2.rs:13:6 + --> $DIR/test-2.rs:13:6 | LL | (box 10 as Box).dup(); | ^^^^^^ `bar` cannot be made into an object @@ -52,7 +52,7 @@ LL | (box 10 as Box).dup(); = help: consider moving `dup` to another trait = help: consider moving `blah` to another trait note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/trait-test-2.rs:4:30 + --> $DIR/test-2.rs:4:30 | LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters diff --git a/src/test/ui/traits/trait-test.rs b/src/test/ui/traits/test.rs similarity index 100% rename from src/test/ui/traits/trait-test.rs rename to src/test/ui/traits/test.rs diff --git a/src/test/ui/traits/trait-test.stderr b/src/test/ui/traits/test.stderr similarity index 89% rename from src/test/ui/traits/trait-test.stderr rename to src/test/ui/traits/test.stderr index f5e47e51526..668228abe09 100644 --- a/src/test/ui/traits/trait-test.stderr +++ b/src/test/ui/traits/test.stderr @@ -1,5 +1,5 @@ error[E0404]: expected trait, found builtin type `isize` - --> $DIR/trait-test.rs:4:6 + --> $DIR/test.rs:4:6 | LL | impl isize for usize { fn foo(&self) {} } | ^^^^^ not a trait diff --git a/src/test/ui/traits/trait-to-str.rs b/src/test/ui/traits/to-str.rs similarity index 100% rename from src/test/ui/traits/trait-to-str.rs rename to src/test/ui/traits/to-str.rs diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs deleted file mode 100644 index 901a2c4391f..00000000000 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs +++ /dev/null @@ -1,14 +0,0 @@ -// aux-build:trait_bounds_on_structs_and_enums_xc.rs - -extern crate trait_bounds_on_structs_and_enums_xc; - -use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait}; - -fn explode(x: Foo) {} -//~^ ERROR E0277 - -fn kaboom(y: Bar) {} -//~^ ERROR E0277 - -fn main() { -} diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs deleted file mode 100644 index 2a4ba9677ef..00000000000 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs +++ /dev/null @@ -1,15 +0,0 @@ -// aux-build:trait_bounds_on_structs_and_enums_xc.rs - -extern crate trait_bounds_on_structs_and_enums_xc; - -use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait}; - -fn main() { - let foo = Foo { - //~^ ERROR E0277 - x: 3 - }; - let bar: Bar = return; - //~^ ERROR E0277 - let _ = bar; -} diff --git a/src/test/ui/traits/ufcs-trait-object.rs b/src/test/ui/traits/ufcs-object.rs similarity index 100% rename from src/test/ui/traits/ufcs-trait-object.rs rename to src/test/ui/traits/ufcs-object.rs diff --git a/src/test/ui/traits/use-trait-before-def.rs b/src/test/ui/traits/use-before-def.rs similarity index 100% rename from src/test/ui/traits/use-trait-before-def.rs rename to src/test/ui/traits/use-before-def.rs diff --git a/src/test/ui/traits/wf-trait-object-maybe-bound.rs b/src/test/ui/traits/wf-object/maybe-bound.rs similarity index 100% rename from src/test/ui/traits/wf-trait-object-maybe-bound.rs rename to src/test/ui/traits/wf-object/maybe-bound.rs diff --git a/src/test/ui/traits/wf-trait-object-maybe-bound.stderr b/src/test/ui/traits/wf-object/maybe-bound.stderr similarity index 74% rename from src/test/ui/traits/wf-trait-object-maybe-bound.stderr rename to src/test/ui/traits/wf-object/maybe-bound.stderr index 4a570efcb5d..2fe3f0fc39f 100644 --- a/src/test/ui/traits/wf-trait-object-maybe-bound.stderr +++ b/src/test/ui/traits/wf-object/maybe-bound.stderr @@ -1,29 +1,29 @@ error: `?Trait` is not permitted in trait object types - --> $DIR/wf-trait-object-maybe-bound.rs:5:15 + --> $DIR/maybe-bound.rs:5:15 | LL | type _0 = dyn ?Sized + Foo; | ^^^^^^ error: `?Trait` is not permitted in trait object types - --> $DIR/wf-trait-object-maybe-bound.rs:8:21 + --> $DIR/maybe-bound.rs:8:21 | LL | type _1 = dyn Foo + ?Sized; | ^^^^^^ error: `?Trait` is not permitted in trait object types - --> $DIR/wf-trait-object-maybe-bound.rs:11:21 + --> $DIR/maybe-bound.rs:11:21 | LL | type _2 = dyn Foo + ?Sized + ?Sized; | ^^^^^^ error: `?Trait` is not permitted in trait object types - --> $DIR/wf-trait-object-maybe-bound.rs:11:30 + --> $DIR/maybe-bound.rs:11:30 | LL | type _2 = dyn Foo + ?Sized + ?Sized; | ^^^^^^ error: `?Trait` is not permitted in trait object types - --> $DIR/wf-trait-object-maybe-bound.rs:15:15 + --> $DIR/maybe-bound.rs:15:15 | LL | type _3 = dyn ?Sized + Foo; | ^^^^^^ diff --git a/src/test/ui/traits/wf-trait-object-no-duplicates.rs b/src/test/ui/traits/wf-object/no-duplicates.rs similarity index 100% rename from src/test/ui/traits/wf-trait-object-no-duplicates.rs rename to src/test/ui/traits/wf-object/no-duplicates.rs diff --git a/src/test/ui/traits/wf-trait-object-no-duplicates.stderr b/src/test/ui/traits/wf-object/no-duplicates.stderr similarity index 92% rename from src/test/ui/traits/wf-trait-object-no-duplicates.stderr rename to src/test/ui/traits/wf-object/no-duplicates.stderr index ed5409d0159..b9506894f82 100644 --- a/src/test/ui/traits/wf-trait-object-no-duplicates.stderr +++ b/src/test/ui/traits/wf-object/no-duplicates.stderr @@ -1,5 +1,5 @@ error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/wf-trait-object-no-duplicates.rs:8:21 + --> $DIR/no-duplicates.rs:8:21 | LL | type _0 = dyn Obj + Obj; | --- ^^^ additional non-auto trait @@ -10,7 +10,7 @@ LL | type _0 = dyn Obj + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/wf-trait-object-no-duplicates.rs:13:28 + --> $DIR/no-duplicates.rs:13:28 | LL | type _1 = dyn Send + Obj + Obj; | --- ^^^ additional non-auto trait @@ -21,7 +21,7 @@ LL | type _1 = dyn Send + Obj + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/wf-trait-object-no-duplicates.rs:16:28 + --> $DIR/no-duplicates.rs:16:28 | LL | type _2 = dyn Obj + Send + Obj; | --- ^^^ additional non-auto trait @@ -32,7 +32,7 @@ LL | type _2 = dyn Obj + Send + Obj; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/wf-trait-object-no-duplicates.rs:26:34 + --> $DIR/no-duplicates.rs:26:34 | LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>; | ---------------- ^^^^^^^^^^^^^^^^ additional non-auto trait @@ -43,7 +43,7 @@ LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>; = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object - --> $DIR/wf-trait-object-no-duplicates.rs:30:42 + --> $DIR/no-duplicates.rs:30:42 | LL | type _5 = dyn ObjT fn(&'a u8)> + ObjT fn(&'b u8)>; | ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^ additional non-auto trait diff --git a/src/test/ui/traits/wf-trait-object-only-maybe-bound.rs b/src/test/ui/traits/wf-object/only-maybe-bound.rs similarity index 100% rename from src/test/ui/traits/wf-trait-object-only-maybe-bound.rs rename to src/test/ui/traits/wf-object/only-maybe-bound.rs diff --git a/src/test/ui/traits/wf-trait-object-only-maybe-bound.stderr b/src/test/ui/traits/wf-object/only-maybe-bound.stderr similarity index 76% rename from src/test/ui/traits/wf-trait-object-only-maybe-bound.stderr rename to src/test/ui/traits/wf-object/only-maybe-bound.stderr index 48241088632..cbc41feec1e 100644 --- a/src/test/ui/traits/wf-trait-object-only-maybe-bound.stderr +++ b/src/test/ui/traits/wf-object/only-maybe-bound.stderr @@ -1,11 +1,11 @@ error: `?Trait` is not permitted in trait object types - --> $DIR/wf-trait-object-only-maybe-bound.rs:3:15 + --> $DIR/only-maybe-bound.rs:3:15 | LL | type _0 = dyn ?Sized; | ^^^^^^ error[E0224]: at least one trait is required for an object type - --> $DIR/wf-trait-object-only-maybe-bound.rs:3:11 + --> $DIR/only-maybe-bound.rs:3:11 | LL | type _0 = dyn ?Sized; | ^^^^^^^^^^ diff --git a/src/test/ui/traits/wf-trait-object-reverse-order.rs b/src/test/ui/traits/wf-object/reverse-order.rs similarity index 100% rename from src/test/ui/traits/wf-trait-object-reverse-order.rs rename to src/test/ui/traits/wf-object/reverse-order.rs diff --git a/src/test/ui/traits/trait-where-clause-vs-impl.rs b/src/test/ui/traits/where-clause-vs-impl.rs similarity index 100% rename from src/test/ui/traits/trait-where-clause-vs-impl.rs rename to src/test/ui/traits/where-clause-vs-impl.rs diff --git a/src/test/ui/traits/trait-with-bounds-default.rs b/src/test/ui/traits/with-bounds-default.rs similarity index 100% rename from src/test/ui/traits/trait-with-bounds-default.rs rename to src/test/ui/traits/with-bounds-default.rs diff --git a/src/test/ui/traits/trait-with-dst.rs b/src/test/ui/traits/with-dst.rs similarity index 100% rename from src/test/ui/traits/trait-with-dst.rs rename to src/test/ui/traits/with-dst.rs