diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-08-26 00:14:01 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-08-26 17:28:47 +0200 |
| commit | a9907a1dd14c8fbed0f1b46f2cdddde7c2c15bbe (patch) | |
| tree | 4deb5b34a0d8645d7f621e1c2c0f12dee16d65ac | |
| parent | aeedf22880ea550ce0aafa827df6f54aaab7c931 (diff) | |
| download | rust-a9907a1dd14c8fbed0f1b46f2cdddde7c2c15bbe.tar.gz rust-a9907a1dd14c8fbed0f1b46f2cdddde7c2c15bbe.zip | |
Small error code explanations improvements
| -rw-r--r-- | src/librustc_lint/types.rs | 1 | ||||
| -rw-r--r-- | src/librustc_trans/diagnostics.rs | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index 99df5c6e5f9..b0b5947145d 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -56,7 +56,6 @@ let Wrapping(x) = x; let y: usize = 1.wrapping_neg(); assert_eq!(x, y); ``` - "## } diff --git a/src/librustc_trans/diagnostics.rs b/src/librustc_trans/diagnostics.rs index f7f065a3562..18d31448b1a 100644 --- a/src/librustc_trans/diagnostics.rs +++ b/src/librustc_trans/diagnostics.rs @@ -23,8 +23,10 @@ extern "platform-intrinsic" { fn simd_add<T>(a: T, b: T) -> T; } -unsafe { simd_add(0, 1); } -// error: invalid monomorphization of `simd_add` intrinsic +fn main() { + unsafe { simd_add(0, 1); } + // error: invalid monomorphization of `simd_add` intrinsic +} ``` The generic type has to be a SIMD type. Example: |
