Skip to content

Commit

Permalink
Make tidy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed May 23, 2020
1 parent b72acd7 commit 8385c1d
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/feature-gates/feature-gate-unsized_fn_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ impl Foo for A {
}

fn foo(x: dyn Foo) {
//~^ ERROR: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time [E0277]
//~^ ERROR [E0277]
x.foo()
}

fn main() {
let x: Box<dyn Foo> = Box::new(A { v: 22 });
foo(*x);
//~^ ERROR: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time [E0277]
//~^ ERROR [E0277]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(arbitrary_self_types, coerce_unsized, dispatch_from_dyn, unsize, unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
#![feature(arbitrary_self_types, coerce_unsized, dispatch_from_dyn, unsize)]
#![feature(unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete

// This tests a few edge-cases around `arbitrary_self_types`. Most specifically,
// it checks that the `ObjectCandidate` you get from method matching can't
Expand Down
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:1:77
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:2:12
|
LL | #![feature(arbitrary_self_types, coerce_unsized, dispatch_from_dyn, unsize, unsized_locals, unsized_fn_params)]
| ^^^^^^^^^^^^^^
LL | #![feature(unsized_locals, unsized_fn_params)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information

error[E0308]: mismatched types
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:86:24
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:87:24
|
LL | let _seetype: () = z;
| -- ^ expected `()`, found `u32`
| |
| expected due to this

error[E0308]: mismatched types
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:103:24
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:104:24
|
LL | let _seetype: () = z;
| -- ^ expected `()`, found `u64`
| |
| expected due to this

error[E0034]: multiple applicable items in scope
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:121:15
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:122:15
|
LL | let z = x.foo();
| ^^^ multiple `foo` found
|
note: candidate #1 is defined in an impl of the trait `internal::X` for the type `T`
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:44:9
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:45:9
|
LL | fn foo(self: Smaht<Self, u64>) -> u64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `nuisance_foo::NuisanceFoo` for the type `T`
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:71:9
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:72:9
|
LL | fn foo(self) {}
| ^^^^^^^^^^^^
note: candidate #3 is defined in the trait `FinalFoo`
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:58:5
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:59:5
|
LL | fn foo(&self) -> u8;
| ^^^^^^^^^^^^^^^^^^^^
Expand All @@ -58,23 +58,23 @@ LL | let z = FinalFoo::foo(x);
| ^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:138:24
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:139:24
|
LL | let _seetype: () = z;
| -- ^ expected `()`, found `u8`
| |
| expected due to this

error[E0308]: mismatched types
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:156:24
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:157:24
|
LL | let _seetype: () = z;
| -- ^ expected `()`, found `u32`
| |
| expected due to this

error[E0308]: mismatched types
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:173:24
--> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:174:24
|
LL | let _seetype: () = z;
| -- ^ expected `()`, found `u32`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/moves/move-out-of-slice-2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_locals)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

struct A;
#[derive(Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/borrow-after-move.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

pub trait Foo {
fn foo(self) -> String;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/by-value-trait-object-safety.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_locals)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

pub trait Foo {
fn foo(self) -> String
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/double-move.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

pub trait Foo {
fn foo(self) -> String;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/issue-30276-feature-flagged.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_locals)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

struct Test([i32]);

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/issue-50940-with-feature.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

fn main() {
struct A<X: ?Sized>(X);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/unsized-exprs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

struct A<X: ?Sized>(X);

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized-locals/unsized-exprs2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^ WARN the feature `unsized_locals` is incomplete

struct A<X: ?Sized>(X);

Expand Down

0 comments on commit 8385c1d

Please sign in to comment.