Skip to content

Fix typo in error message E0277 #52231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<T: ?Sized> !Send for *mut T { }
#[stable(feature = "rust1", since = "1.0.0")]
#[lang = "sized"]
#[rustc_on_unimplemented(
message="the size for value values of type `{Self}` cannot be known at compilation time",
message="the size for values of type `{Self}` cannot be known at compilation time",
label="doesn't have a size known at compile-time",
note="to learn more, visit <https://doc.rust-lang.org/book/second-edition/\
ch19-04-advanced-types.html#dynamically-sized-types--sized>",
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/associated-types-unsized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait Get {
}

fn foo<T:Get>(t: T) {
let x = t.get(); //~ ERROR the size for value values of type
let x = t.get(); //~ ERROR the size for values of type
}

fn main() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/bad-sized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ trait Trait {}
pub fn main() {
let x: Vec<Trait + Sized> = Vec::new();
//~^ ERROR only auto traits can be used as additional traits in a trait object
//~| ERROR the size for value values of type
//~| ERROR the size for value values of type
//~| ERROR the size for values of type
//~| ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-assign-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ pub fn main() {
let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
let z: Box<ToBar> = Box::new(Bar1 {f: 36});
f5.ptr = *z;
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-assign-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ pub fn main() {
//~| expected type `dyn ToBar`
//~| found type `Bar1`
//~| expected trait ToBar, found struct `Bar1`
//~| ERROR the size for value values of type
//~| ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-assign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ pub fn main() {
//~| expected type `dyn ToBar`
//~| found type `Bar1`
//~| expected trait ToBar, found struct `Bar1`
//~| ERROR the size for value values of type
//~| ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-deep-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ pub fn main() {
let f: ([isize; 3],) = ([5, 6, 7],);
let g: &([isize],) = &f;
let h: &(([isize],),) = &(*g,);
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/dst-bad-deep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ pub fn main() {
let f: Fat<[isize; 3]> = Fat { ptr: [5, 6, 7] };
let g: &Fat<[isize]> = &f;
let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g };
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
8 changes: 4 additions & 4 deletions src/test/compile-fail/dst-object-from-unsized-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ impl Foo for [u8] {}

fn test1<T: ?Sized + Foo>(t: &T) {
let u: &Foo = t;
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn test2<T: ?Sized + Foo>(t: &T) {
let v: &Foo = t as &Foo;
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn test3() {
let _: &[&Foo] = &["hi"];
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn test4(x: &[u8]) {
let _: &Foo = x as &Foo;
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() { }
4 changes: 2 additions & 2 deletions src/test/compile-fail/dst-sized-trait-param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized

impl Foo<[isize]> for usize { }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

impl Foo<isize> for [usize] { }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

pub fn main() { }
8 changes: 4 additions & 4 deletions src/test/compile-fail/extern-types-unsized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ fn assert_sized<T>() { }

fn main() {
assert_sized::<A>();
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

assert_sized::<Foo>();
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

assert_sized::<Bar<A>>();
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

assert_sized::<Bar<Bar<A>>>();
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-14366.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

fn main() {
let _x = "test" as &::std::any::Any;
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-15756.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn dft_iter<'a, T>(arg1: Chunks<'a,T>, arg2: ChunksMut<'a,T>)
{
for
&mut something
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
in arg2
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-17651.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@

fn main() {
(|| Box::new(*(&[0][..])))();
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-18107.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub trait AbstractRenderer {}

fn _create_render(_: &()) ->
AbstractRenderer
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
{
match 0 {
_ => unimplemented!()
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-18919.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
type FuncType<'f> = Fn(&isize) -> isize + 'f;

fn ho_func(f: Option<FuncType>) {
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-20005.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait From<Src> {
}

trait To {
fn to<Dst>( //~ ERROR the size for value values of type
fn to<Dst>( //~ ERROR the size for values of type
self
) -> <Dst as From<Self>>::Result where Dst: From<Self> {
From::from(self)
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-20433.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ struct The;

impl The {
fn iceman(c: Vec<[i32]>) {}
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-20605.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

fn changer<'a>(mut things: Box<Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-22874.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

struct Table {
rows: [[String]],
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn f(table: &Table) -> &[String] {
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-23281.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct Struct;

impl Struct {
pub fn function(funs: Vec<Fn() -> ()>) {}
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-24446.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
fn main() {
static foo: Fn() -> u32 = || -> u32 {
//~^ ERROR mismatched types
//~| ERROR the size for value values of type
//~| ERROR the size for values of type
0
};
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-27060-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#[repr(packed)]
pub struct Bad<T: ?Sized> {
data: T, //~ ERROR the size for value values of type
data: T, //~ ERROR the size for values of type
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-27078.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
trait Foo {
const BAR: i32;
fn foo(self) -> &'static i32 {
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
&<Self>::BAR
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-35988.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

enum E {
V([Box<E>]),
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-38954.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
// except according to those terms.

fn _test(ref _p: str) {}
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

fn main() { }
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-41229-ref-str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
// except according to those terms.

pub fn example(ref s: str) {}
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

fn main() {}
4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-42312.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use std::ops::Deref;

pub trait Foo {
fn baz(_: Self::Target) where Self: Deref {}
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

pub fn f(_: ToString) {}
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

fn main() { }
4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-5883.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct Struct {
}

fn new_struct(r: A+'static)
-> Struct { //~^ ERROR the size for value values of type
//~^ ERROR the size for value values of type
-> Struct { //~^ ERROR the size for values of type
//~^ ERROR the size for values of type
Struct { r: r }
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/range-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ pub fn main() {
// Unsized type.
let arr: &[_] = &[1, 2, 3];
let range = *arr..;
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/str-mut-idx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ fn bot<T>() -> T { loop {} }

fn mutate(s: &mut str) {
s[1..2] = bot();
//~^ ERROR the size for value values of type
//~| ERROR the size for value values of type
//~^ ERROR the size for values of type
//~| ERROR the size for values of type
s[1usize] = bot();
//~^ ERROR the type `str` cannot be mutably indexed by `usize`
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/substs-ppaux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ fn foo<'z>() where &'z (): Sized {
//[normal]~| found type `fn() {foo::<'static>}`

<str as Foo<u8>>::bar;
//[verbose]~^ ERROR the size for value values of type
//[normal]~^^ ERROR the size for value values of type
//[verbose]~^ ERROR the size for values of type
//[normal]~^^ ERROR the size for values of type
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait Foo {
// This should emit the less confusing error, not the more confusing one.

fn foo(_x: Foo + Send) {
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() { }
4 changes: 2 additions & 2 deletions src/test/compile-fail/union/union-unsized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

union U {
a: str,
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type

b: u8,
}

union W {
a: u8,
b: str,
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/unsized-bare-typaram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

fn bar<T: Sized>() { }
fn foo<T: ?Sized>() { bar::<T>() }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
fn main() { }
2 changes: 1 addition & 1 deletion src/test/compile-fail/unsized-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn not_sized<T: ?Sized>() { }
enum Foo<U> { FooSome(U), FooNone }
fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
//
// Not OK: `T` is not sized.

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/unsized-inherent-impl-self-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
struct S5<Y>(Y);

impl<X: ?Sized> S5<X> {
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() { }
4 changes: 2 additions & 2 deletions src/test/compile-fail/unsized-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ fn not_sized<T: ?Sized>() { }
struct Foo<T> { data: T }
fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
//
// Not OK: `T` is not sized.

struct Bar<T: ?Sized> { data: T }
fn bar1<T: ?Sized>() { not_sized::<Bar<T>>() }
fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
//
// Not OK: `Bar<T>` is not sized, but it should be.

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/unsized-trait-impl-self-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait T3<Z: ?Sized> {
struct S5<Y>(Y);

impl<X: ?Sized> T3<X> for S5<X> {
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() { }
2 changes: 1 addition & 1 deletion src/test/compile-fail/unsized-trait-impl-trait-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trait T2<Z> {
}
struct S4<Y: ?Sized>(Box<Y>);
impl<X: ?Sized> T2<X> for S4<X> {
//~^ ERROR the size for value values of type
//~^ ERROR the size for values of type
}

fn main() { }
Loading