Commit Graph

365 Commits

Author SHA1 Message Date
Dylan DPC 41dc51ead8 Rollup merge of #71166 - GuillaumeGomez:cleanup-e0518, r=Dylan-DPC
Clean up E0518 explanation

r? @Dylan-DPC
2020-04-16 00:39:27 +02:00
Guillaume Gomez 0fcdefb559 Clean up E0518 explanation 2020-04-15 14:20:40 +02:00
Dylan DPC 03167297aa Rollup merge of #71120 - GuillaumeGomez:cleanup-e0517, r=Dylan-DPC
Clean up E0517 explanation

r? @Dylan-DPC
2020-04-14 15:35:30 +02:00
Guillaume Gomez eed4b219e2 Clean up E0517 explanation 2020-04-14 13:26:17 +02:00
Dylan DPC e684630666 Rollup merge of #71057 - GuillaumeGomez:cleanup-e0516, r=Dylan-DPC
Clean up E0516 explanation

r? @Dylan-DPC
2020-04-12 14:49:10 +02:00
Dylan DPC b3372ba1d0 Rollup merge of #71034 - GuillaumeGomez:cleanup-e0515, r=Dylan-DPC
Clean up E0515 explanation

r? @Dylan-DPC
2020-04-12 14:49:03 +02:00
Guillaume Gomez d0b23d5b83 Clean up E0516 explanation 2020-04-12 13:58:05 +02:00
Guillaume Gomez e2e41c9527 Clean up E0515 explanation 2020-04-11 18:58:03 +02:00
Mazdak Farrokhzad d36991a400 Rollup merge of #70985 - GuillaumeGomez:cleanup-e0512, r=Dylan-DPC
Clean up E0512 explanation

r? @Dylan-DPC
2020-04-10 18:15:26 +02:00
Guillaume Gomez 1d01ce2392 Clean up E0512 explanation 2020-04-10 13:19:49 +02:00
Mazdak Farrokhzad 54807cab1d Rollup merge of #70952 - GuillaumeGomez:cleanup-e0511, r=Dylan-DPC
Clean up E0511 explanation

r? @Dylan-DPC
2020-04-10 12:48:48 +02:00
Mazdak Farrokhzad 74e93bb8e6 Rollup merge of #70913 - eddyb:rc-arc-diagnostic-items, r=matthewjasper
Replace "rc"/"arc" lang items with Rc/Arc diagnostic items.

`Rc`/`Arc` should have no special semantics, so it seems appropriate for them to not be lang items.

r? @matthewjasper
2020-04-10 12:48:45 +02:00
Guillaume Gomez 44daa4521a Clean up E0511 explanation 2020-04-09 13:48:11 +02:00
Mazdak Farrokhzad 4f00396f14 Rollup merge of #70916 - Centril:track-caller-ffi, r=eddyb
Support `#[track_caller]` on functions in `extern "Rust" { ... }`

Fixes https://github.com/rust-lang/rust/issues/70830 which is the follow-up to @eddyb's suggestion in https://github.com/rust-lang/rust/pull/69251#discussion_r380791634 to allow `#[track_caller]` on `fn`s in FFI imports, that is, on functions in `extern "Rust" { ... }` blocks.

This requires that the other side, the FFI export, also have the `#[track_caller]` attribute. Otherwise, undefined behavior is triggered and the blame lies, as usual, with the `unsafe { ... }` block which called the FFI imported function.

After this PR, all forms of `fn` items with the right ABI (`"Rust"`) support `#[track_caller]`.

As a drive-by, the PR also hardens the check rejecting `#[naked] #[track_caller]` such that methods and other forms of `fn` items are also considered.

r? @eddyb
cc @rust-lang/lang
2020-04-09 05:29:45 +02:00
Mazdak Farrokhzad 45589b52fe track_caller: support on FFI imports 2020-04-09 04:55:05 +02:00
Dylan DPC 1498da87c2 Rollup merge of #70927 - GuillaumeGomez:cleanup-e0510, r=Dylan-DPC
Clean up E0510 explanation

r? @Dylan-DPC
2020-04-08 18:37:31 +02:00
Dylan DPC 66966667b5 Rollup merge of #70883 - GuillaumeGomez:cleanup-e0507, r=Dylan-DPC
Clean up E0507 explanation

r? @Dylan-DPC
2020-04-08 18:37:25 +02:00
Guillaume Gomez 80e3126ec1 Clean up E0510 explanation 2020-04-08 15:05:52 +02:00
Eduard-Mihai Burtescu 9d13520a6b Replace "rc"/"arc" lang items with Rc/Arc diagnostic items. 2020-04-08 10:47:41 +03:00
Guillaume Gomez 6569a2ec1b Clean up E0507 explanation 2020-04-07 14:08:04 +02:00
Dylan DPC 6e412786de Rollup merge of #70839 - GuillaumeGomez:cleanup-e0506, r=Dylan-DPC
clean up E0506 explanation

r? @Dylan-DPC
2020-04-07 00:31:41 +02:00
Dylan DPC 7500bcfbb2 Rollup merge of #70690 - GuillaumeGomez:cleanup-e0501, r=Dylan-DPC
Clean up E0501 explanation

r? @Dylan-DPC
2020-04-07 00:31:38 +02:00
Guillaume Gomez 84c97ee9a0 Clean up E0501 explanation 2020-04-06 18:12:42 +02:00
Guillaume Gomez 3a10bdcfb6 clean up E0506 explanation 2020-04-06 14:20:01 +02:00
Mazdak Farrokhzad 0f56ccdb34 Rollup merge of #70735 - GuillaumeGomez:cleanup-e0502, r=Dylan-DPC
Clean up E0502 explanation

r? @Dylan-DPC
2020-04-03 22:55:14 +02:00
Guillaume Gomez 9db7360593 Clean up E0502 explanation 2020-04-03 13:41:34 +02:00
Dylan DPC 37b2e3fe56 Rollup merge of #70649 - GuillaumeGomez:cleanup-e0468, r=Dylan-DPC
clean up E0468 explanation

r? @Dylan-DPC
2020-04-01 22:25:22 +02:00
Guillaume Gomez 3bcb3ef8d3 clean up E0468 explanation 2020-04-01 13:18:14 +02:00
Dylan DPC 6248b59316 Rollup merge of #70606 - GuillaumeGomez:cleanup-e0466, r=Dylan-DPC
Clean up E0466 explanation

r? @Dylan-DPC
2020-03-31 19:29:33 +02:00
Mazdak Farrokhzad 3ef70fe156 Rollup merge of #70562 - lcnr:const-arr_len, r=Centril
infer array len from pattern

closes #70529

This still errors in the following case

```rust
#![feature(const_generics)]
fn arr<const N: usize>() -> [u8; N] {
    todo!()
}

fn main() {
    match arr() {
        [5, ..] => (),
        //~^ ERROR cannot pattern-match on an array without a fixed length
        [_, _] => (),
    }
}
```
Considering that this should be rare and is harder to implement I would merge this PR without *fixing* the above.
2020-03-31 15:59:46 +02:00
Mazdak Farrokhzad cbe3266c65 Rollup merge of #70548 - Ersikan:master, r=GuillaumeGomez
Add long error code for error E0226

Added a long description message for error E0226, which previously did not exist.
As requested in issue #61137

r? @GuillaumeGomez
2020-03-31 15:59:41 +02:00
Guillaume Gomez 194a3718ab Clean up E0466 explanation 2020-03-31 13:55:58 +02:00
Bastian Kauschke a3df1db8ee update tests, improve variable names 2020-03-30 19:34:16 +02:00
Julien Philippon 32103b127f Correct long error message according to reviews 2020-03-30 19:02:01 +02:00
Mazdak Farrokhzad 7710f2dd5c rustc -> rustc_middle part 1 2020-03-30 07:02:56 +02:00
Julien Philippon 8f7eb6229c Add long error code for error E0226 2020-03-30 02:51:25 +02:00
bors 8045865873 Auto merge of #70370 - petrochenkov:nosmatch, r=Centril
Remove attribute `#[structural_match]` and any references to it

A small remaining part of https://github.com/rust-lang/rust/issues/63438.
2020-03-29 06:33:42 +00:00
Dylan DPC 1f13089bef Rollup merge of #70418 - PankajChaudhary5:master, r=Dylan-DPC
Add long error explanation for E0703

Add long explanation for the E0703 error code
Part of #61137

r? @GuillaumeGomez
2020-03-28 15:21:57 +01:00
PankajChaudhary5 c09b5a3ed3 Refactor changes 2020-03-27 20:00:49 +05:30
Dylan DPC 3de5a892ac Rollup merge of #70470 - GuillaumeGomez:cleanup-e0463, r=Dylan-DPC
Clean up E0463 explanation

r? @Dylan-DPC
2020-03-27 15:09:59 +01:00
Dylan DPC 6b6c470bee Rollup merge of #69887 - GuillaumeGomez:cleanup-e0404, r=Dylan-DPC
clean up E0404 explanation

r? @Dylan-DPC
2020-03-27 15:09:54 +01:00
Guillaume Gomez 88100baa2c clean up E0404 explanation 2020-03-27 15:04:16 +01:00
PankajChaudhary5 0d90612952 Refactor changes 2020-03-27 19:16:32 +05:30
Guillaume Gomez 346bc41086 Clean up E0463 explanation 2020-03-27 13:35:00 +01:00
PankajChaudhary5 28fe986ae3 fix suggested changes 2020-03-27 09:53:16 +05:30
bors 6c19a10e24 Auto merge of #68404 - Amanieu:llvm-asm, r=estebank
Rename asm! to llvm_asm!

As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850.

This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
2020-03-27 03:27:09 +00:00
Dylan DPC e5c5e025ac Rollup merge of #70429 - GuillaumeGomez:cleanup-e0459, r=Dylan-DPC
Clean up E0459 explanation

r? @Dylan-DPC
2020-03-26 21:44:08 +01:00
Amanieu d'Antras 1cc521ef9d Update tests to use llvm_asm! 2020-03-26 15:49:22 +00:00
Amanieu d'Antras d162d096dd Rename asm! to llvm_asm!
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-03-26 15:49:22 +00:00
Guillaume Gomez 604b7e94e0 Clean up E0459 explanation 2020-03-26 14:21:05 +01:00