Skip to content

Commit 07f2f05

Browse files
authored
Update error_codes.rs
1 parent 2541d49 commit 07f2f05

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc_typeck/error_codes.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ a guard.
194194
```compile_fail,E0029
195195
let string = "salutations !";
196196
197-
// The ordering relation for strings can't be evaluated at compile time,
197+
// The ordering relation for strings cannot be evaluated at compile time,
198198
// so this doesn't work:
199199
match string {
200200
"hello" ..= "world" => {}
@@ -348,7 +348,7 @@ fn main() {
348348
"##,
349349

350350
E0044: r##"
351-
You can't use type or const parameters on foreign items.
351+
You cannot use type or const parameters on foreign items.
352352
Example of erroneous code:
353353
354354
```compile_fail,E0044
@@ -788,7 +788,7 @@ fn some_other_func() {}
788788
fn some_function() {
789789
SOME_CONST = 14; // error : a constant value cannot be changed!
790790
1 = 3; // error : 1 isn't a valid place!
791-
some_other_func() = 4; // error : we can't assign value to a function!
791+
some_other_func() = 4; // error : we cannot assign value to a function!
792792
SomeStruct.x = 12; // error : SomeStruct a structure name but it is used
793793
// like a variable!
794794
}
@@ -3905,8 +3905,8 @@ struct Aligned(i32);
39053905
struct Packed(Aligned);
39063906
```
39073907
3908-
Just like you can't have both `align` and `packed` representation hints on a
3909-
same type, a `packed` type can't contain another type with the `align`
3908+
Just like you cannot have both `align` and `packed` representation hints on a
3909+
same type, a `packed` type cannot contain another type with the `align`
39103910
representation hint. However, you can do the opposite:
39113911
39123912
```
@@ -4326,7 +4326,7 @@ extern {
43264326
43274327
unsafe {
43284328
printf(::std::ptr::null(), 0f32);
4329-
// error: can't pass an `f32` to variadic function, cast to `c_double`
4329+
// error: cannot pass an `f32` to variadic function, cast to `c_double`
43304330
}
43314331
```
43324332
@@ -5023,7 +5023,7 @@ the future, [RFC 2091] prohibits their implementation without a follow-up RFC.
50235023
// E0174,
50245024
// E0182, // merged into E0229
50255025
E0183,
5026-
// E0187, // can't infer the kind of the closure
5026+
// E0187, // cannot infer the kind of the closure
50275027
// E0188, // can not cast an immutable reference to a mutable pointer
50285028
// E0189, // deprecated: can only cast a boxed pointer to a boxed object
50295029
// E0190, // deprecated: can only cast a &-pointer to an &-object

0 commit comments

Comments
 (0)