Skip to content

Commit a9907a1

Browse files
Small error code explanations improvements
1 parent aeedf22 commit a9907a1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/librustc_lint/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ let Wrapping(x) = x;
5656
let y: usize = 1.wrapping_neg();
5757
assert_eq!(x, y);
5858
```
59-
6059
"##
6160
}
6261

src/librustc_trans/diagnostics.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ extern "platform-intrinsic" {
2323
fn simd_add<T>(a: T, b: T) -> T;
2424
}
2525
26-
unsafe { simd_add(0, 1); }
27-
// error: invalid monomorphization of `simd_add` intrinsic
26+
fn main() {
27+
unsafe { simd_add(0, 1); }
28+
// error: invalid monomorphization of `simd_add` intrinsic
29+
}
2830
```
2931
3032
The generic type has to be a SIMD type. Example:

0 commit comments

Comments
 (0)