]> git.lizzy.rs Git - rust.git/commitdiff
Stop sorting bodies by span.
authorCamille GILLOT <gillot.camille@gmail.com>
Fri, 16 Jul 2021 14:54:47 +0000 (16:54 +0200)
committerCamille GILLOT <gillot.camille@gmail.com>
Wed, 1 Sep 2021 18:13:16 +0000 (20:13 +0200)
The definition order is already close to the span order, and only differs
in corner cases.

17 files changed:
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_hir/src/hir.rs
compiler/rustc_middle/src/ty/mod.rs
compiler/rustc_typeck/src/check_unused.rs
src/test/ui/asm/type-check-1.stderr
src/test/ui/borrowck/issue-64453.stderr
src/test/ui/const-generics/type_mismatch.stderr
src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.mir.stderr
src/test/ui/consts/issue-66693.stderr
src/test/ui/issues/issue-47486.stderr
src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
src/test/ui/proc-macro/attribute-with-error.stderr
src/test/ui/repeat_count.stderr
src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr
src/test/ui/suggestions/suggest-ref-macro.stderr
src/test/ui/union/union-derive-clone.mirunsafeck.stderr
src/test/ui/union/union-derive-clone.thirunsafeck.stderr

index deb7e742e5cc3b31d1233b85ff7694e9d104287e..196d48faf5173c013625fa9e5ee23accc9d8fd55 100644 (file)
@@ -516,7 +516,6 @@ fn visit_ty(&mut self, t: &'tcx Ty) {
         self.owners.ensure_contains_elem(CRATE_DEF_ID, || None);
         self.owners[CRATE_DEF_ID] = Some(hir::OwnerNode::Crate(module));
 
-        let body_ids = body_ids(&self.bodies);
         let proc_macros =
             c.proc_macros.iter().map(|id| self.node_id_to_hir_id[*id].unwrap()).collect();
 
@@ -552,7 +551,6 @@ fn visit_ty(&mut self, t: &'tcx Ty) {
         let krate = hir::Crate {
             owners: self.owners,
             bodies: self.bodies,
-            body_ids,
             trait_impls: self.trait_impls,
             modules: self.modules,
             proc_macros,
@@ -2771,14 +2769,6 @@ fn maybe_lint_missing_abi(&mut self, span: Span, id: NodeId, default: Abi) {
     }
 }
 
-fn body_ids(bodies: &BTreeMap<hir::BodyId, hir::Body<'_>>) -> Vec<hir::BodyId> {
-    // Sorting by span ensures that we get things in order within a
-    // file, and also puts the files in a sensible order.
-    let mut body_ids: Vec<_> = bodies.keys().cloned().collect();
-    body_ids.sort_by_key(|b| bodies[b].value.span);
-    body_ids
-}
-
 /// Helper struct for delayed construction of GenericArgs.
 struct GenericArgsCtor<'hir> {
     args: SmallVec<[hir::GenericArg<'hir>; 4]>,
index a9bd83a67c9dcff2c73efbaa95ee70f1c1294195..d629cb602145631f25acc8197bc2543ef6513aaa 100644 (file)
@@ -674,12 +674,6 @@ pub struct Crate<'hir> {
     pub bodies: BTreeMap<BodyId, Body<'hir>>,
     pub trait_impls: BTreeMap<DefId, Vec<LocalDefId>>,
 
-    /// A list of the body ids written out in the order in which they
-    /// appear in the crate. If you're going to process all the bodies
-    /// in the crate, you should iterate over this list rather than the keys
-    /// of bodies.
-    pub body_ids: Vec<BodyId>,
-
     /// A list of modules written out in the order in which they
     /// appear in the crate. This includes the main crate module.
     pub modules: BTreeMap<LocalDefId, ModuleItems>,
index 8aa27d4ca53e3fe21c3c0ff6c5273bc1927c839b..cfb49b7d9b8c57681850e9ff83708d18abd9f3bc 100644 (file)
@@ -1677,16 +1677,12 @@ pub fn typeck_body(self, body: hir::BodyId) -> &'tcx TypeckResults<'tcx> {
     /// crate. If you would prefer to iterate over the bodies
     /// themselves, you can do `self.hir().krate().body_ids.iter()`.
     pub fn body_owners(self) -> impl Iterator<Item = LocalDefId> + Captures<'tcx> + 'tcx {
-        self.hir()
-            .krate()
-            .body_ids
-            .iter()
-            .map(move |&body_id| self.hir().body_owner_def_id(body_id))
+        self.hir().krate().bodies.keys().map(move |&body_id| self.hir().body_owner_def_id(body_id))
     }
 
     pub fn par_body_owners<F: Fn(LocalDefId) + sync::Sync + sync::Send>(self, f: F) {
-        par_iter(&self.hir().krate().body_ids)
-            .for_each(|&body_id| f(self.hir().body_owner_def_id(body_id)));
+        par_iter(&self.hir().krate().bodies)
+            .for_each(|(&body_id, _)| f(self.hir().body_owner_def_id(body_id)));
     }
 
     pub fn provided_trait_methods(self, id: DefId) -> impl 'tcx + Iterator<Item = &'tcx AssocItem> {
index 95d3bb1172305b391992e1b32b9364938e2a4ed2..cb127880c62b315c41ee3bb6547ef463cd1358a4 100644 (file)
@@ -9,8 +9,7 @@
 
 pub fn check_crate(tcx: TyCtxt<'_>) {
     let mut used_trait_imports = FxHashSet::default();
-    for &body_id in tcx.hir().krate().bodies.keys() {
-        let item_def_id = tcx.hir().body_owner_def_id(body_id);
+    for item_def_id in tcx.body_owners() {
         let imports = tcx.used_trait_imports(item_def_id);
         debug!("GatherVisitor: item_def_id={:?} with imports {:#?}", item_def_id, imports);
         used_trait_imports.extend(imports.iter());
index ad981d93d514e8e3d1d1985a837055fe4e403593..5edbcf4a2a7c939a327dc66b1a9e8042d31de97a 100644 (file)
@@ -25,6 +25,21 @@ LL |         let x = 0;
 LL |         asm!("{}", const const_bar(x));
    |                                    ^ non-constant value
 
+error[E0308]: mismatched types
+  --> $DIR/type-check-1.rs:48:26
+   |
+LL |         asm!("{}", const 0f32);
+   |                          ^^^^ expected integer, found `f32`
+
+error[E0308]: mismatched types
+  --> $DIR/type-check-1.rs:50:26
+   |
+LL |         asm!("{}", const 0 as *mut u8);
+   |                          ^^^^^^^^^^^^ expected integer, found *-ptr
+   |
+   = note:     expected type `{integer}`
+           found raw pointer `*mut u8`
+
 error: invalid asm output
   --> $DIR/type-check-1.rs:10:29
    |
@@ -64,21 +79,6 @@ LL |         asm!("{}", inout(reg) v[..]);
    = help: the trait `Sized` is not implemented for `[u64]`
    = note: all inline asm arguments must have a statically known size
 
-error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:48:26
-   |
-LL |         asm!("{}", const 0f32);
-   |                          ^^^^ expected integer, found `f32`
-
-error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:50:26
-   |
-LL |         asm!("{}", const 0 as *mut u8);
-   |                          ^^^^^^^^^^^^ expected integer, found *-ptr
-   |
-   = note:     expected type `{integer}`
-           found raw pointer `*mut u8`
-
 error[E0308]: mismatched types
   --> $DIR/type-check-1.rs:60:25
    |
index 5513c3d217e2a3c4a35b22c8ae2f7899106c81ba..14e1667038965b772576cbc3106e1b071bcc5d9a 100644 (file)
@@ -1,9 +1,3 @@
-error[E0507]: cannot move out of static item `settings_dir`
-  --> $DIR/issue-64453.rs:14:37
-   |
-LL |     let settings_data = from_string(settings_dir);
-   |                                     ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait
-
 error: `Arguments::<'a>::new_v1` is not yet stable as a const fn
   --> $DIR/issue-64453.rs:4:31
    |
@@ -21,6 +15,12 @@ LL | static settings_dir: String = format!("");
    |
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
+error[E0507]: cannot move out of static item `settings_dir`
+  --> $DIR/issue-64453.rs:14:37
+   |
+LL |     let settings_data = from_string(settings_dir);
+   |                                     ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait
+
 error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0015, E0507.
index f5053e4c8c8d3f348d55d25bca1812f8ac6b759e..8d779bee265cf2914c24c6f12b3272bb35578e5c 100644 (file)
@@ -4,12 +4,6 @@ error[E0308]: mismatched types
 LL |     bar::<N>()
    |           ^ expected `u8`, found `usize`
 
-error[E0308]: mismatched types
-  --> $DIR/type_mismatch.rs:5:31
-   |
-LL | fn bar<const N: u8>() -> [u8; N] {}
-   |                               ^ expected `usize`, found `u8`
-
 error[E0308]: mismatched types
   --> $DIR/type_mismatch.rs:5:26
    |
@@ -18,6 +12,12 @@ LL | fn bar<const N: u8>() -> [u8; N] {}
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 
+error[E0308]: mismatched types
+  --> $DIR/type_mismatch.rs:5:31
+   |
+LL | fn bar<const N: u8>() -> [u8; N] {}
+   |                               ^ expected `usize`, found `u8`
+
 error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
index b643ecc0ce8d98047bc458e7aeff00114368c70e..33014a1500cf7061793586bf57f37ac5db885ea3 100644 (file)
@@ -1,16 +1,16 @@
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/const-extern-fn-requires-unsafe.rs:11:5
+  --> $DIR/const-extern-fn-requires-unsafe.rs:9:17
    |
-LL |     foo();
-   |     ^^^^^ call to unsafe function
+LL |     let a: [u8; foo()];
+   |                 ^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/const-extern-fn-requires-unsafe.rs:9:17
+  --> $DIR/const-extern-fn-requires-unsafe.rs:11:5
    |
-LL |     let a: [u8; foo()];
-   |                 ^^^^^ call to unsafe function
+LL |     foo();
+   |     ^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
index 50c95c89e0b79485f1e770c344ca98b7fddcb20d..3349e9813a809e08a19bdc9e5ec2ca27c49d80db 100644 (file)
@@ -1,11 +1,3 @@
-error: argument to `panic!()` in a const context must have type `&str`
-  --> $DIR/issue-66693.rs:13:5
-   |
-LL |     panic!(&1);
-   |     ^^^^^^^^^^^
-   |
-   = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
-
 error: argument to `panic!()` in a const context must have type `&str`
   --> $DIR/issue-66693.rs:6:15
    |
@@ -22,5 +14,13 @@ LL | static _FOO: () = panic!(true);
    |
    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
 
+error: argument to `panic!()` in a const context must have type `&str`
+  --> $DIR/issue-66693.rs:13:5
+   |
+LL |     panic!(&1);
+   |     ^^^^^^^^^^^
+   |
+   = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: aborting due to 3 previous errors
 
index cf95d309c63442d42fc605af7acb61b50a49f76b..a029948ca3b82bba510816c6dc1d7fdbd3c6dd3c 100644 (file)
@@ -1,15 +1,15 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-47486.rs:3:31
+   |
+LL |     [0u8; std::mem::size_of::<_>()];
+   |                               ^ cannot infer type
+
 error[E0308]: mismatched types
   --> $DIR/issue-47486.rs:2:10
    |
 LL |     () < std::mem::size_of::<_>();
    |          ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `usize`
 
-error[E0282]: type annotations needed
-  --> $DIR/issue-47486.rs:3:11
-   |
-LL |     [0u8; std::mem::size_of::<_>()];
-   |           ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0282, E0308.
index d08fbac0bcaabc006112c6dafc5f7b0b79710ea2..d9dac5de6226c304f9c044686fb98ccabfddec5c 100644 (file)
@@ -1,17 +1,3 @@
-error[E0308]: mismatched types
-  --> $DIR/liveness-return-last-stmt-semi.rs:4:41
-   |
-LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
-   |                                ---      ^^^    - help: consider removing this semicolon
-   |                                |        |
-   |                                |        expected `i32`, found `()`
-   |                                implicitly returns `()` as its body has no tail or `return` expression
-...
-LL |     test!();
-   |     -------- in this macro invocation
-   |
-   = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
-
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:7:19
    |
@@ -38,6 +24,20 @@ LL | fn baz(x: u64) -> u32 {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 
+error[E0308]: mismatched types
+  --> $DIR/liveness-return-last-stmt-semi.rs:4:41
+   |
+LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
+   |                                ---      ^^^    - help: consider removing this semicolon
+   |                                |        |
+   |                                |        expected `i32`, found `()`
+   |                                implicitly returns `()` as its body has no tail or `return` expression
+...
+LL |     test!();
+   |     -------- in this macro invocation
+   |
+   = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
index 7f3a7e670b9b75b8c5727f55502d9b03c985a8a1..127c49957c1e55b3032a14cc937d70113c57370c 100644 (file)
@@ -1,3 +1,11 @@
+error[E0308]: mismatched types
+  --> $DIR/attribute-with-error.rs:25:22
+   |
+LL |         let a: i32 = "foo";
+   |                ---   ^^^^^ expected `i32`, found `&str`
+   |                |
+   |                expected due to this
+
 error[E0308]: mismatched types
   --> $DIR/attribute-with-error.rs:10:18
    |
@@ -14,14 +22,6 @@ LL |     let b: i32 = "f'oo";
    |            |
    |            expected due to this
 
-error[E0308]: mismatched types
-  --> $DIR/attribute-with-error.rs:25:22
-   |
-LL |         let a: i32 = "foo";
-   |                ---   ^^^^^ expected `i32`, found `&str`
-   |                |
-   |                expected due to this
-
 error[E0308]: mismatched types
   --> $DIR/attribute-with-error.rs:35:22
    |
index cd07e5b8935f201cb0418b0b45fbc2ee28e27003..c85f057203146ffdc52157e9f903a196c862a5f2 100644 (file)
@@ -30,12 +30,6 @@ error[E0308]: mismatched types
 LL |     let e = [0; "foo"];
    |                 ^^^^^ expected `usize`, found `&str`
 
-error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:31:17
-   |
-LL |     let g = [0; G { g: () }];
-   |                 ^^^^^^^^^^^ expected `usize`, found struct `G`
-
 error[E0308]: mismatched types
   --> $DIR/repeat_count.rs:19:17
    |
@@ -63,6 +57,12 @@ help: change the type of the numeric literal from `u8` to `usize`
 LL |     let f = [0; 4usize];
    |                 ~~~~~~
 
+error[E0308]: mismatched types
+  --> $DIR/repeat_count.rs:31:17
+   |
+LL |     let g = [0; G { g: () }];
+   |                 ^^^^^^^^^^^ expected `usize`, found struct `G`
+
 error: aborting due to 9 previous errors
 
 Some errors have detailed explanations: E0308, E0435.
index 1cde42ff2cb018b4851a3905f8cfd938f071a469..bb7919ebb7996338108f03caa21f05031f67647d 100644 (file)
@@ -1,20 +1,3 @@
-error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
-  --> $DIR/impl-trait-with-missing-bounds.rs:6:13
-   |
-LL |         qux(constraint);
-   |             ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
-   |
-   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
-note: required by a bound in `qux`
-  --> $DIR/impl-trait-with-missing-bounds.rs:50:16
-   |
-LL | fn qux(_: impl std::fmt::Debug) {}
-   |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
-help: introduce a type parameter with a trait bound instead of using `impl Trait`
-   |
-LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
-   |       +++++++++++++              ~  ++++++++++++++++++++++++++++++++++
-
 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:14:13
    |
@@ -83,6 +66,23 @@ help: introduce a type parameter with a trait bound instead of using `impl Trait
 LL | fn bak<I: Iterator + std::fmt::Debug>(constraints: I) where <I as Iterator>::Item: Debug {
    |       +++++++++++++++++++++++++++++++              ~  ++++++++++++++++++++++++++++++++++
 
+error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
+  --> $DIR/impl-trait-with-missing-bounds.rs:6:13
+   |
+LL |         qux(constraint);
+   |             ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
+note: required by a bound in `qux`
+  --> $DIR/impl-trait-with-missing-bounds.rs:50:16
+   |
+LL | fn qux(_: impl std::fmt::Debug) {}
+   |                ^^^^^^^^^^^^^^^ required by this bound in `qux`
+help: introduce a type parameter with a trait bound instead of using `impl Trait`
+   |
+LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
+   |       +++++++++++++              ~  ++++++++++++++++++++++++++++++++++
+
 error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:45:13
    |
index 147001f0c948b93e3d64a511174968b10cbfbdbe..1f41d2329ee9ef18780f4a6042f288072b37cabb 100644 (file)
@@ -1,11 +1,3 @@
-error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:8:1
-   |
-LL | #[hello]
-   | ^^^^^^^^ expected `&mut i32`, found integer
-   |
-   = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
 error[E0308]: mismatched types
   --> $DIR/suggest-ref-macro.rs:15:11
    |
@@ -29,6 +21,14 @@ LL |     bla!(456);
    |          expected `&mut i32`, found integer
    |          help: consider mutably borrowing here: `&mut 456`
 
+error[E0308]: mismatched types
+  --> $DIR/suggest-ref-macro.rs:8:1
+   |
+LL | #[hello]
+   | ^^^^^^^^ expected `&mut i32`, found integer
+   |
+   = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
index 414d2759a47982bc68cfd9d6da163256895fb4fb..b52117cd19cca32b262e4228f63bd1f42c56dfa1 100644 (file)
@@ -1,16 +1,3 @@
-error[E0277]: the trait bound `U1: Copy` is not satisfied
-  --> $DIR/union-derive-clone.rs:6:10
-   |
-LL | #[derive(Clone)]
-   |          ^^^^^ the trait `Copy` is not implemented for `U1`
-   |
-note: required by a bound in `AssertParamIsCopy`
-  --> $SRC_DIR/core/src/clone.rs:LL:COL
-   |
-LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
-   |                                 ^^^^ required by this bound in `AssertParamIsCopy`
-   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-
 error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
   --> $DIR/union-derive-clone.rs:38:15
    |
@@ -30,6 +17,19 @@ LL |     let w = u.clone();
            `CloneNoCopy: Copy`
            which is required by `U5<CloneNoCopy>: Clone`
 
+error[E0277]: the trait bound `U1: Copy` is not satisfied
+  --> $DIR/union-derive-clone.rs:6:10
+   |
+LL | #[derive(Clone)]
+   |          ^^^^^ the trait `Copy` is not implemented for `U1`
+   |
+note: required by a bound in `AssertParamIsCopy`
+  --> $SRC_DIR/core/src/clone.rs:LL:COL
+   |
+LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
+   |                                 ^^^^ required by this bound in `AssertParamIsCopy`
+   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0277, E0599.
index 414d2759a47982bc68cfd9d6da163256895fb4fb..b52117cd19cca32b262e4228f63bd1f42c56dfa1 100644 (file)
@@ -1,16 +1,3 @@
-error[E0277]: the trait bound `U1: Copy` is not satisfied
-  --> $DIR/union-derive-clone.rs:6:10
-   |
-LL | #[derive(Clone)]
-   |          ^^^^^ the trait `Copy` is not implemented for `U1`
-   |
-note: required by a bound in `AssertParamIsCopy`
-  --> $SRC_DIR/core/src/clone.rs:LL:COL
-   |
-LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
-   |                                 ^^^^ required by this bound in `AssertParamIsCopy`
-   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-
 error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
   --> $DIR/union-derive-clone.rs:38:15
    |
@@ -30,6 +17,19 @@ LL |     let w = u.clone();
            `CloneNoCopy: Copy`
            which is required by `U5<CloneNoCopy>: Clone`
 
+error[E0277]: the trait bound `U1: Copy` is not satisfied
+  --> $DIR/union-derive-clone.rs:6:10
+   |
+LL | #[derive(Clone)]
+   |          ^^^^^ the trait `Copy` is not implemented for `U1`
+   |
+note: required by a bound in `AssertParamIsCopy`
+  --> $SRC_DIR/core/src/clone.rs:LL:COL
+   |
+LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
+   |                                 ^^^^ required by this bound in `AssertParamIsCopy`
+   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0277, E0599.