diff options
Diffstat (limited to 'src/test')
30 files changed, 521 insertions, 138 deletions
diff --git a/src/test/rustdoc-gui/codeblock-tooltip.goml b/src/test/rustdoc-gui/codeblock-tooltip.goml index f01e0c3c6cc..8e681a2a0c3 100644 --- a/src/test/rustdoc-gui/codeblock-tooltip.goml +++ b/src/test/rustdoc-gui/codeblock-tooltip.goml @@ -2,95 +2,79 @@ goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html" show-text: true -// Dark theme. -local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"} -reload: - -// compile_fail block -assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgba(255, 0, 0, 0.5)"}) -assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}) - -move-cursor-to: ".docblock .example-wrap.compile_fail" - -assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgb(255, 0, 0)"}) -assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgb(255, 0, 0)"}) - -// should_panic block -assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgba(255, 0, 0, 0.5)"}) -assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}) - -move-cursor-to: ".docblock .example-wrap.should_panic" - -assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgb(255, 0, 0)"}) -assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgb(255, 0, 0)"}) - -// ignore block -assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgba(255, 142, 0, 0.6)"}) -assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgba(255, 142, 0, 0.6)"}) - -move-cursor-to: ".docblock .example-wrap.ignore" - -assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgb(255, 142, 0)"}) -assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgb(255, 142, 0)"}) - - -// Light theme. -local-storage: {"rustdoc-theme": "light"} -reload: - -assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgba(255, 0, 0, 0.5)"}) -assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}) - -move-cursor-to: ".docblock .example-wrap.compile_fail" - -assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgb(255, 0, 0)"}) -assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgb(255, 0, 0)"}) - -// should_panic block -assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgba(255, 0, 0, 0.5)"}) -assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}) - -move-cursor-to: ".docblock .example-wrap.should_panic" - -assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgb(255, 0, 0)"}) -assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgb(255, 0, 0)"}) - -// ignore block -assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgba(255, 142, 0, 0.6)"}) -assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgba(255, 142, 0, 0.6)"}) - -move-cursor-to: ".docblock .example-wrap.ignore" - -assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgb(255, 142, 0)"}) -assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgb(255, 142, 0)"}) - - -// Ayu theme. -local-storage: {"rustdoc-theme": "ayu"} -reload: - -assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgba(255, 0, 0, 0.5)"}) -assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}) - -move-cursor-to: ".docblock .example-wrap.compile_fail" - -assert-css: (".docblock .example-wrap.compile_fail .tooltip", {"color": "rgb(255, 0, 0)"}) -assert-css: (".docblock .example-wrap.compile_fail", {"border-left": "2px solid rgb(255, 0, 0)"}) - -// should_panic block -assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgba(255, 0, 0, 0.5)"}) -assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}) - -move-cursor-to: ".docblock .example-wrap.should_panic" - -assert-css: (".docblock .example-wrap.should_panic .tooltip", {"color": "rgb(255, 0, 0)"}) -assert-css: (".docblock .example-wrap.should_panic", {"border-left": "2px solid rgb(255, 0, 0)"}) - -// ignore block -assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgba(255, 142, 0, 0.6)"}) -assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgba(255, 142, 0, 0.6)"}) - -move-cursor-to: ".docblock .example-wrap.ignore" - -assert-css: (".docblock .example-wrap.ignore .tooltip", {"color": "rgb(255, 142, 0)"}) -assert-css: (".docblock .example-wrap.ignore", {"border-left": "2px solid rgb(255, 142, 0)"}) +define-function: ( + "check-colors", + (theme), + [ + // Setting the theme. + ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}), + ("reload"), + + // compile_fail block + ("assert-css", ( + ".docblock .example-wrap.compile_fail .tooltip", + {"color": "rgba(255, 0, 0, 0.5)"}, + )), + ("assert-css", ( + ".docblock .example-wrap.compile_fail", + {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}, + )), + + ("move-cursor-to", ".docblock .example-wrap.compile_fail"), + + ("assert-css", ( + ".docblock .example-wrap.compile_fail .tooltip", + {"color": "rgb(255, 0, 0)"}, + )), + ("assert-css", ( + ".docblock .example-wrap.compile_fail", + {"border-left": "2px solid rgb(255, 0, 0)"}, + )), + + // should_panic block + ("assert-css", ( + ".docblock .example-wrap.should_panic .tooltip", + {"color": "rgba(255, 0, 0, 0.5)"}, + )), + ("assert-css", ( + ".docblock .example-wrap.should_panic", + {"border-left": "2px solid rgba(255, 0, 0, 0.5)"}, + )), + + ("move-cursor-to", ".docblock .example-wrap.should_panic"), + + ("assert-css", ( + ".docblock .example-wrap.should_panic .tooltip", + {"color": "rgb(255, 0, 0)"}, + )), + ("assert-css", ( + ".docblock .example-wrap.should_panic", + {"border-left": "2px solid rgb(255, 0, 0)"}, + )), + + // ignore block + ("assert-css", ( + ".docblock .example-wrap.ignore .tooltip", + {"color": "rgba(255, 142, 0, 0.6)"}, + )), + ("assert-css", ( + ".docblock .example-wrap.ignore", + {"border-left": "2px solid rgba(255, 142, 0, 0.6)"}, + )), + + ("move-cursor-to", ".docblock .example-wrap.ignore"), + + ("assert-css", ( + ".docblock .example-wrap.ignore .tooltip", + {"color": "rgb(255, 142, 0)"}, + )), + ("assert-css", ( + ".docblock .example-wrap.ignore", + {"border-left": "2px solid rgb(255, 142, 0)"}, + )), + ], +) + +call-function: ("check-colors", ("ayu")) +call-function: ("check-colors", ("dark")) +call-function: ("check-colors", ("light")) diff --git a/src/test/rustdoc-gui/item-decl-colors.goml b/src/test/rustdoc-gui/item-decl-colors.goml new file mode 100644 index 00000000000..ce688287a74 --- /dev/null +++ b/src/test/rustdoc-gui/item-decl-colors.goml @@ -0,0 +1,74 @@ +// This test ensures that the color of the items in the type decl are working as expected. +define-function: ( + "check-colors", + ( + theme, + attr_color, + trait_color, + struct_color, + enum_color, + primitive_color, + constant_color, + fn_color, + assoc_type_color, + ), + [ + ("goto", "file://" + |DOC_PATH| + "/test_docs/struct.WithGenerics.html"), + ("show-text", true), + ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}), + ("reload"), + ("assert-css", (".item-decl .code-attribute", {"color": |attr_color|}, ALL)), + ("assert-css", (".item-decl .trait", {"color": |trait_color|}, ALL)), + // We need to add `code` here because otherwise it would select the parent too. + ("assert-css", (".item-decl code .struct", {"color": |struct_color|}, ALL)), + ("assert-css", (".item-decl .enum", {"color": |enum_color|}, ALL)), + ("assert-css", (".item-decl .primitive", {"color": |primitive_color|}, ALL)), + ("goto", "file://" + |DOC_PATH| + "/test_docs/trait.TraitWithoutGenerics.html"), + ("assert-css", (".item-decl .constant", {"color": |constant_color|}, ALL)), + ("assert-css", (".item-decl .fnname", {"color": |fn_color|}, ALL)), + ("assert-css", (".item-decl .associatedtype", {"color": |assoc_type_color|}, ALL)), + ], +) + +call-function: ( + "check-colors", + { + "theme": "ayu", + "attr_color": "rgb(153, 153, 153)", + "trait_color": "rgb(57, 175, 215)", + "struct_color": "rgb(255, 160, 165)", + "enum_color": "rgb(255, 160, 165)", + "primitive_color": "rgb(255, 160, 165)", + "constant_color": "rgb(57, 175, 215)", + "fn_color": "rgb(253, 214, 135)", + "assoc_type_color": "rgb(57, 175, 215)", + }, +) +call-function: ( + "check-colors", + { + "theme": "dark", + "attr_color": "rgb(153, 153, 153)", + "trait_color": "rgb(183, 140, 242)", + "struct_color": "rgb(45, 191, 184)", + "enum_color": "rgb(45, 191, 184)", + "primitive_color": "rgb(45, 191, 184)", + "constant_color": "rgb(210, 153, 29)", + "fn_color": "rgb(43, 171, 99)", + "assoc_type_color": "rgb(210, 153, 29)", + }, +) +call-function: ( + "check-colors", + { + "theme": "light", + "attr_color": "rgb(153, 153, 153)", + "trait_color": "rgb(110, 79, 201)", + "struct_color": "rgb(173, 55, 138)", + "enum_color": "rgb(173, 55, 138)", + "primitive_color": "rgb(173, 55, 138)", + "constant_color": "rgb(56, 115, 173)", + "fn_color": "rgb(173, 124, 55)", + "assoc_type_color": "rgb(56, 115, 173)", + }, +) diff --git a/src/test/rustdoc-gui/mobile.goml b/src/test/rustdoc-gui/mobile.goml index 22a53dea616..704542a39d2 100644 --- a/src/test/rustdoc-gui/mobile.goml +++ b/src/test/rustdoc-gui/mobile.goml @@ -12,7 +12,7 @@ assert-css: (".main-heading", { "flex-direction": "column" }) -assert-property: (".mobile-topbar h2.location", {"offsetHeight": 36}) +assert-property: (".mobile-topbar h2", {"offsetHeight": 36}) // Note: We can't use assert-text here because the 'Since' is set by CSS and // is therefore not part of the DOM. diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml index 4b3ec79273d..453873f1b81 100644 --- a/src/test/rustdoc-gui/sidebar-mobile.goml +++ b/src/test/rustdoc-gui/sidebar-mobile.goml @@ -23,6 +23,11 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"}) click: ".sidebar-menu-toggle" assert-css: (".sidebar", {"left": "0px"}) +// Make sure the "struct Foo" header is hidden, since the mobile topbar already does it. +assert-css: ("//nav[contains(@class, 'sidebar')]//h2/a[text()='Foo']/parent::h2", {"display": "none"}) +// Make sure the global navigation is still here. +assert-css: ("//nav[contains(@class, 'sidebar')]//h2/a[text()='In test_docs']/parent::h2", {"display": "block"}) + // Click elsewhere. click: "body" assert-css: (".sidebar", {"display": "block", "left": "-1000px"}) @@ -39,7 +44,7 @@ assert-position: ("#method\.must_use", {"y": 45}) // Check that the bottom-most item on the sidebar menu can be scrolled fully into view. click: ".sidebar-menu-toggle" scroll-to: ".block.keyword li:nth-child(1)" -compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543}) +compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543.19}) // Now checking the background color of the sidebar. show-text: true diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml index 54193234af9..5058630f469 100644 --- a/src/test/rustdoc-gui/sidebar.goml +++ b/src/test/rustdoc-gui/sidebar.goml @@ -9,6 +9,7 @@ reload: assert-text: (".sidebar > .location", "Crate test_docs") // In modules, we only have one "location" element. assert-count: (".sidebar .location", 1) +assert-count: (".sidebar h2", 1) assert-text: ("#all-types", "All Items") assert-css: ("#all-types", {"color": "rgb(53, 109, 164)"}) // We check that we have the crates list and that the "current" on is "test_docs". @@ -19,16 +20,18 @@ assert-text: (".sidebar-elems section ul > li:nth-child(2)", "Modules") assert-text: (".sidebar-elems section ul > li:nth-child(3)", "Macros") assert-text: (".sidebar-elems section ul > li:nth-child(4)", "Structs") assert-text: (".sidebar-elems section ul > li:nth-child(5)", "Enums") -assert-text: (".sidebar-elems section ul > li:nth-child(6)", "Traits") -assert-text: (".sidebar-elems section ul > li:nth-child(7)", "Functions") -assert-text: (".sidebar-elems section ul > li:nth-child(8)", "Type Definitions") -assert-text: (".sidebar-elems section ul > li:nth-child(9)", "Unions") -assert-text: (".sidebar-elems section ul > li:nth-child(10)", "Keywords") +assert-text: (".sidebar-elems section ul > li:nth-child(6)", "Constants") +assert-text: (".sidebar-elems section ul > li:nth-child(7)", "Traits") +assert-text: (".sidebar-elems section ul > li:nth-child(8)", "Functions") +assert-text: (".sidebar-elems section ul > li:nth-child(9)", "Type Definitions") +assert-text: (".sidebar-elems section ul > li:nth-child(10)", "Unions") +assert-text: (".sidebar-elems section ul > li:nth-child(11)", "Keywords") assert-text: ("#structs + .item-table .item-left > a", "Foo") click: "#structs + .item-table .item-left > a" // PAGE: struct.Foo.html -assert-count: (".sidebar .location", 2) +assert-count: (".sidebar .location", 1) +assert-count: (".sidebar h2", 2) // We check that there is no crate listed outside of the top level. assert-false: ".sidebar-elems > .crate" @@ -60,10 +63,11 @@ assert-text: ("#functions + .item-table .item-left > a", "foobar") click: "#functions + .item-table .item-left > a" // PAGE: fn.foobar.html -// In items containing no items (like functions or constants) and in modules, we have one -// "location" elements. -assert-count: (".sidebar .location", 1) -assert-text: (".sidebar .sidebar-elems .location", "In lib2") +// In items containing no items (like functions or constants) and in modules, we have no +// "location" elements. Only the parent module h2. +assert-count: (".sidebar .location", 0) +assert-count: (".sidebar h2", 1) +assert-text: (".sidebar .sidebar-elems h2", "In lib2") // We check that we don't have the crate list. assert-false: ".sidebar-elems > .crate" diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs index cc0efe7231a..77617e10beb 100644 --- a/src/test/rustdoc-gui/src/test_docs/lib.rs +++ b/src/test/rustdoc-gui/src/test_docs/lib.rs @@ -5,6 +5,7 @@ #![crate_name = "test_docs"] #![feature(rustdoc_internals)] #![feature(doc_cfg)] +#![feature(associated_type_defaults)] /*! Enable the feature <span class="stab portability"><code>some-feature</code></span> to enjoy @@ -386,3 +387,20 @@ impl TypeWithNoDocblocks { pub unsafe fn unsafe_fn() {} pub fn safe_fn() {} + +#[repr(C)] +pub struct WithGenerics<T: TraitWithNoDocblocks, S = String, E = WhoLetTheDogOut, P = i8> { + s: S, + t: T, + e: E, + p: P, +} + +pub const CONST: u8 = 0; + +pub trait TraitWithoutGenerics { + const C: u8 = CONST; + type T = SomeType; + + fn foo(); +} diff --git a/src/test/rustdoc-gui/type-declation-overflow.goml b/src/test/rustdoc-gui/type-declation-overflow.goml index 657c3cfa4b6..fce3002e750 100644 --- a/src/test/rustdoc-gui/type-declation-overflow.goml +++ b/src/test/rustdoc-gui/type-declation-overflow.goml @@ -32,6 +32,6 @@ assert-property: (".item-decl pre", {"scrollWidth": "950"}) size: (600, 600) goto: "file://" + |DOC_PATH| + "/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html" // It shouldn't have an overflow in the topbar either. -store-property: (scrollWidth, ".mobile-topbar .location", "scrollWidth") -assert-property: (".mobile-topbar .location", {"clientWidth": |scrollWidth|}) -assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"}) +store-property: (scrollWidth, ".mobile-topbar h2", "scrollWidth") +assert-property: (".mobile-topbar h2", {"clientWidth": |scrollWidth|}) +assert-css: (".mobile-topbar h2", {"overflow-x": "hidden"}) diff --git a/src/test/ui/impl-trait/issue-86465.rs b/src/test/ui/impl-trait/issue-86465.rs index a79bb6474d8..8c7b41d73b7 100644 --- a/src/test/ui/impl-trait/issue-86465.rs +++ b/src/test/ui/impl-trait/issue-86465.rs @@ -1,6 +1,10 @@ #![feature(type_alias_impl_trait)] -type X<'a, 'b> = impl std::fmt::Debug; +pub trait Captures<'a> {} + +impl<'a, T: ?Sized> Captures<'a> for T {} + +type X<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>; fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) { (a, a) diff --git a/src/test/ui/impl-trait/issue-86465.stderr b/src/test/ui/impl-trait/issue-86465.stderr index 90d6904ed61..b949b2b4245 100644 --- a/src/test/ui/impl-trait/issue-86465.stderr +++ b/src/test/ui/impl-trait/issue-86465.stderr @@ -1,5 +1,5 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/issue-86465.rs:6:5 + --> $DIR/issue-86465.rs:10:5 | LL | (a, a) | ^^^^^^ diff --git a/src/test/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs b/src/test/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs new file mode 100644 index 00000000000..287a030cf87 --- /dev/null +++ b/src/test/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs @@ -0,0 +1,23 @@ +// check-pass + +pub struct VecNumber<'s> { + pub vec_number: Vec<Number<'s>>, + pub auxiliary_object: &'s Vec<usize>, +} + +pub struct Number<'s> { + pub number: &'s usize, +} + +impl<'s> VecNumber<'s> { + pub fn vec_number_iterable_per_item_in_auxiliary_object( + &self, + ) -> impl Iterator<Item = (&'s usize, impl Iterator<Item = &Number<'s>>)> { + self.auxiliary_object.iter().map(move |n| { + let iter_number = self.vec_number.iter(); + (n, iter_number) + }) + } +} + +fn main() {} diff --git a/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs b/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs index ce2726ffde4..0c771ae8795 100644 --- a/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs +++ b/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs @@ -1,4 +1,4 @@ -#![feature(staged_api)] +#![feature(staged_api, never_type, c_unwind)] //~^ ERROR module has missing stability attribute #[stable(feature = "a", since = "1")] @@ -23,7 +23,21 @@ impl StableTrait for UnstableType {} impl UnstableTrait for StableType {} #[unstable(feature = "h", issue = "none")] +impl StableTrait for ! {} + +// Note: If C-unwind is stabilized, switch this to another (unstable) ABI. +#[unstable(feature = "i", issue = "none")] +impl StableTrait for extern "C-unwind" fn() {} + +#[unstable(feature = "j", issue = "none")] //~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl] impl StableTrait for StableType {} +#[unstable(feature = "k", issue = "none")] +//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl] +impl StableTrait for fn() -> ! {} + +#[unstable(feature = "l", issue = "none")] +impl StableTrait for fn() -> UnstableType {} + fn main() {} diff --git a/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr b/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr index 7645f3c7ef5..b91a1d2e11a 100644 --- a/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr @@ -1,16 +1,24 @@ error: an `#[unstable]` annotation here has no effect - --> $DIR/stability-attribute-trait-impl.rs:25:1 + --> $DIR/stability-attribute-trait-impl.rs:32:1 | -LL | #[unstable(feature = "h", issue = "none")] +LL | #[unstable(feature = "j", issue = "none")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information = note: `#[deny(ineffective_unstable_trait_impl)]` on by default +error: an `#[unstable]` annotation here has no effect + --> $DIR/stability-attribute-trait-impl.rs:36:1 + | +LL | #[unstable(feature = "k", issue = "none")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information + error: module has missing stability attribute --> $DIR/stability-attribute-trait-impl.rs:1:1 | -LL | / #![feature(staged_api)] +LL | / #![feature(staged_api, never_type, c_unwind)] LL | | LL | | LL | | #[stable(feature = "a", since = "1")] @@ -19,5 +27,5 @@ LL | | LL | | fn main() {} | |____________^ -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors diff --git a/src/test/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs b/src/test/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs index 02fee1a00da..585874e273d 100644 --- a/src/test/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs +++ b/src/test/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-fuchsia Test must be run out-of-process +// needs-unwind (#73509) #![feature(test)] diff --git a/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.rs b/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.rs index 4f424b8c665..5f75fdc716e 100644 --- a/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.rs +++ b/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.rs @@ -1,7 +1,11 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -type OneLifetime<'a, 'b> = impl std::fmt::Debug; +pub trait Captures<'a> {} + +impl<'a, T: ?Sized> Captures<'a> for T {} + +type OneLifetime<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>; fn foo<'a, 'b>(a: &'a u32, b: &'b u32) -> OneLifetime<'a, 'b> { a diff --git a/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr b/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr index 0c50a84e894..546598e8a5c 100644 --- a/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr +++ b/src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.stderr @@ -1,11 +1,11 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/different_lifetimes_defining_uses.rs:11:5 + --> $DIR/different_lifetimes_defining_uses.rs:15:5 | LL | b | ^ expected `&'a u32`, got `&'b u32` | note: previous use here - --> $DIR/different_lifetimes_defining_uses.rs:7:5 + --> $DIR/different_lifetimes_defining_uses.rs:11:5 | LL | a | ^ diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs index c9b9e128f88..9d938a61600 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs @@ -2,8 +2,11 @@ fn main() {} -type Two<'a, 'b> = impl std::fmt::Debug; +pub trait Captures<'a> {} +impl<'a, T: ?Sized> Captures<'a> for T {} + +type Two<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>; fn one<'a>(t: &'a ()) -> Two<'a, 'a> { t diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr index 222aaea78d9..72e1ef4b492 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr @@ -1,13 +1,13 @@ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_lifetime_param.rs:9:5 + --> $DIR/generic_duplicate_lifetime_param.rs:12:5 | LL | t | ^ | note: lifetime used multiple times - --> $DIR/generic_duplicate_lifetime_param.rs:5:10 + --> $DIR/generic_duplicate_lifetime_param.rs:9:10 | -LL | type Two<'a, 'b> = impl std::fmt::Debug; +LL | type Two<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>; | ^^ ^^ error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs index 093c1c23186..80462f8ac04 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs @@ -7,7 +7,12 @@ fn main() {} // test that unused generic parameters are ok type TwoTys<T, U> = impl Debug; -type TwoLifetimes<'a, 'b> = impl Debug; + +pub trait Captures<'a> {} + +impl<'a, T: ?Sized> Captures<'a> for T {} + +type TwoLifetimes<'a, 'b> = impl Debug + Captures<'a> + Captures<'b>; type TwoConsts<const X: usize, const Y: usize> = impl Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr index b2edcc5526a..98e4bfea10d 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr @@ -1,5 +1,5 @@ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:16:5 + --> $DIR/generic_duplicate_param_use.rs:21:5 | LL | t | ^ @@ -11,25 +11,25 @@ LL | type TwoTys<T, U> = impl Debug; | ^ ^ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:21:5 + --> $DIR/generic_duplicate_param_use.rs:26:5 | LL | t | ^ | note: lifetime used multiple times - --> $DIR/generic_duplicate_param_use.rs:10:19 + --> $DIR/generic_duplicate_param_use.rs:15:19 | -LL | type TwoLifetimes<'a, 'b> = impl Debug; +LL | type TwoLifetimes<'a, 'b> = impl Debug + Captures<'a> + Captures<'b>; | ^^ ^^ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:26:5 + --> $DIR/generic_duplicate_param_use.rs:31:5 | LL | t | ^ | note: constant used multiple times - --> $DIR/generic_duplicate_param_use.rs:12:16 + --> $DIR/generic_duplicate_param_use.rs:17:16 | LL | type TwoConsts<const X: usize, const Y: usize> = impl Debug; | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs index e109c38c986..106efefbaf2 100644 --- a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs +++ b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs @@ -1,10 +1,11 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![feature(type_alias_impl_trait)] fn main() {} -type Region<'a> = impl std::fmt::Debug; +type Region<'a> = impl std::fmt::Debug + 'a; + fn region<'b>(a: &'b ()) -> Region<'b> { a diff --git a/src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check3.rs b/src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check3.rs index 6e5b8f491ea..07f825aea50 100644 --- a/src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check3.rs +++ b/src/test/ui/type-alias-impl-trait/implied_lifetime_wf_check3.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] mod test_lifetime_param { - type Ty<'a> = impl Sized; + type Ty<'a> = impl Sized + 'a; fn defining(a: &str) -> Ty<'_> { a } fn assert_static<'a: 'static>() {} //~^ WARN: unnecessary lifetime parameter `'a` @@ -10,7 +10,7 @@ mod test_lifetime_param { } mod test_higher_kinded_lifetime_param { - type Ty<'a> = impl Sized; + type Ty<'a> = impl Sized + 'a; fn defining(a: &str) -> Ty<'_> { a } fn assert_static<'a: 'static>() {} //~^ WARN: unnecessary lifetime parameter `'a` diff --git a/src/test/ui/type-alias-impl-trait/issue-89686.rs b/src/test/ui/type-alias-impl-trait/issue-89686.rs index de070fc9deb..058417bdb80 100644 --- a/src/test/ui/type-alias-impl-trait/issue-89686.rs +++ b/src/test/ui/type-alias-impl-trait/issue-89686.rs @@ -4,7 +4,7 @@ use std::future::Future; -type G<'a, T> = impl Future<Output = ()>; +type G<'a, T> = impl Future<Output = ()> + 'a; trait Trait { type F: Future<Output = ()>; diff --git a/src/test/ui/type-alias-impl-trait/issue-89686.stderr b/src/test/ui/type-alias-impl-trait/issue-89686.stderr index b636ada8b75..3b95a575ac2 100644 --- a/src/test/ui/type-alias-impl-trait/issue-89686.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-89686.stderr @@ -6,7 +6,7 @@ LL | async move { self.f().await } | help: consider restricting type parameter `T` | -LL | type G<'a, T: Trait> = impl Future<Output = ()>; +LL | type G<'a, T: Trait> = impl Future<Output = ()> + 'a; | +++++++ error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/missing_lifetime_bound.rs b/src/test/ui/type-alias-impl-trait/missing_lifetime_bound.rs new file mode 100644 index 00000000000..428194058c3 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/missing_lifetime_bound.rs @@ -0,0 +1,7 @@ +#![feature(type_alias_impl_trait)] + +type Opaque<'a, T> = impl Sized; +fn defining<'a, T>(x: &'a i32) -> Opaque<T> { x } +//~^ ERROR: non-defining opaque type use in defining scope + +fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/missing_lifetime_bound.stderr b/src/test/ui/type-alias-impl-trait/missing_lifetime_bound.stderr new file mode 100644 index 00000000000..df2b3ed1911 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/missing_lifetime_bound.stderr @@ -0,0 +1,8 @@ +error: non-defining opaque type use in defining scope + --> $DIR/missing_lifetime_bound.rs:4:47 + | +LL | fn defining<'a, T>(x: &'a i32) -> Opaque<T> { x } + | ^ lifetime `'a` is part of concrete type but not used in parameter list of the `impl Trait` type alias + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs index 3f122f10609..65eb2952e0f 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs @@ -1,6 +1,10 @@ #![feature(type_alias_impl_trait)] -type Foo<'a, 'b> = impl std::fmt::Debug; +pub trait Captures<'a> {} + +impl<'a, T: ?Sized> Captures<'a> for T {} + +type Foo<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>; fn foo<'x, 'y>(i: &'x i32, j: &'y i32) -> (Foo<'x, 'y>, Foo<'y, 'x>) { (i, i) //~ ERROR concrete type differs from previous diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr index 81e603e2355..d7676b8e9b1 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.stderr @@ -1,5 +1,5 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/multiple-def-uses-in-one-fn-lifetimes.rs:6:5 + --> $DIR/multiple-def-uses-in-one-fn-lifetimes.rs:10:5 | LL | (i, i) | ^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs index 83fd9a1da45..21fca047a3c 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs @@ -7,7 +7,11 @@ fn f<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<A, B>) (a.clone(), a) } -type Foo<'a, 'b> = impl std::fmt::Debug; +pub trait Captures<'a> {} + +impl<'a, T: ?Sized> Captures<'a> for T {} + +type Foo<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>; fn foo<'x, 'y>(i: &'x i32, j: &'y i32) -> (Foo<'x, 'y>, Foo<'y, 'x>) { (i, j) diff --git a/src/test/ui/typeck/slow-lhs-suggestion.rs b/src/test/ui/typeck/slow-lhs-suggestion.rs new file mode 100644 index 00000000000..80dfd683524 --- /dev/null +++ b/src/test/ui/typeck/slow-lhs-suggestion.rs @@ -0,0 +1,26 @@ +fn main() { + 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + //~^ ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment + //~| ERROR invalid left-hand side of assignment +} diff --git a/src/test/ui/typeck/slow-lhs-suggestion.stderr b/src/test/ui/typeck/slow-lhs-suggestion.stderr new file mode 100644 index 00000000000..c5bf795eeee --- /dev/null +++ b/src/test/ui/typeck/slow-lhs-suggestion.stderr @@ -0,0 +1,187 @@ +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:95 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:91 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:87 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:83 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:79 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:75 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:71 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:67 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:63 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:59 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:55 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:51 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:47 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:43 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:39 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:35 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:31 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:27 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:23 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:19 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:15 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:11 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error[E0070]: invalid left-hand side of assignment + --> $DIR/slow-lhs-suggestion.rs:2:7 + | +LL | 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1; + | - ^ + | | + | cannot assign to this expression + +error: aborting due to 23 previous errors + +For more information about this error, try `rustc --explain E0070`. |
