Esteban Küber
6b338e034a
Suggest correct enum variant on typo
2018-11-24 16:25:13 -08:00
Oliver Scherer
b820cc79a9
Clean up array/slice of primitive validation
2018-11-24 11:36:32 +01:00
Oliver Scherer
87bd5d13d8
Remove stderr file, because the test passes now
2018-11-24 11:36:32 +01:00
Oliver Scherer
ef332959dc
Reintroduce zst-slice reading read_bytes method on Memory
2018-11-24 11:36:32 +01:00
Oliver Scherer
ebf03363f2
Properly test for int pointers in fat pointers to str slices of zero chars
2018-11-24 11:36:31 +01:00
Oliver Scherer
20dee47a66
Add regression test for integral pointers in zst str slice fat pointers
2018-11-24 11:36:31 +01:00
scalexm
4478dced47
Fix NLL ui test
2018-11-24 01:24:40 +01:00
Esteban Küber
d011313d84
Reword EOF in macro arm message
2018-11-23 15:49:31 -08:00
Esteban Küber
c45871ba02
Keep label on moved spans and point at macro invocation on parse error
2018-11-23 15:37:31 -08:00
Esteban Küber
76449d86c0
Point at macro arm when it doesn't expand to an expression
2018-11-23 15:37:31 -08:00
Esteban Küber
e5cd1edfa1
Reword incorrect macro invocation primary label
2018-11-23 15:37:31 -08:00
Esteban Küber
34bd86a3fd
Add label when replacing primary DUMMY_SP in macro expansion
2018-11-23 15:37:31 -08:00
Esteban Küber
ea9ccb6046
Point at end of macro arm when encountering EOF
...
Fix #52866
2018-11-23 15:37:31 -08:00
bors
aecbcd1ce2
Auto merge of #55808 - estebank:type-arguments, r=petrochenkov
...
Suggest correct syntax when writing type arg instead of assoc type
- When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
- When encountering multiple missing associated types, emit only one diagnostic.
- Point at associated type def span for context.
- Point at each extra type argument.
Follow up to #48288 , fix #20977 .
2018-11-23 11:26:48 +00:00
Esteban Küber
510f836d23
Do not point at associated types from other crates
...
This is a somewhat arbitrary restriction in order to be consistent in the
output of the tests regardless of target platform.
2018-11-22 14:30:33 -08:00
Esteban Küber
a5d35631fe
Reword and fix test
2018-11-22 14:14:27 -08:00
Esteban Küber
48fa974211
Suggest correct syntax when writing type arg instead of assoc type
...
When confusing an associated type with a type argument, suggest the
appropriate syntax.
Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
2018-11-22 14:14:27 -08:00
Esteban Küber
b6f4b29c6d
Point at the associated type's def span
2018-11-22 14:14:27 -08:00
Esteban Küber
286f7ae1dd
Join multiple E0191 errors in the same location under a single diagnostic
2018-11-22 14:14:27 -08:00
Esteban Küber
abdcb868ff
Point at every unexpected lifetime and type argument in E0107
2018-11-22 14:14:27 -08:00
bors
00e03ee574
Auto merge of #56143 - nikomatsakis:issue-56128-segment-id-ice-nightly, r=petrochenkov
...
Issue 56128 segment id ice nightly
Tentative fix for #56128
From what I can tell, the problem is that if you have `pub(super) use foo::{a, b}`, then when we explode the `a` and `b`, the segment ids from the `super` path were not getting cloned. However, once I fixed *that*, then I ran into a problem that the "visibility" node-ids were not present in the final HIR -- this is because the visibility of the "stem" that is returned in this case was getting reset to inherited. I don't *think* it is a problem to undo that, so that the visibility is returned unmodified.
Fixes #55475
Fixes #56128
cc @nrc @petrochenkov
2018-11-22 20:29:51 +00:00
Guillaume Gomez
1bc97081a5
Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichton
...
Fix error message for `-C panic=xxx`.
Fixes rust-lang/cargo#6334
2018-11-22 10:37:54 +01:00
Guillaume Gomez
75d226ed76
Rollup merge of #56002 - Axary:master, r=estebank
...
fix #55972 : Erroneous self arguments on bare functions emit subpar compilation error
#55972
r? @estebank
2018-11-22 10:37:50 +01:00
Guillaume Gomez
636f0a9a1d
Rollup merge of #55980 - csmoe:issue-55891, r=estebank
...
Suggest on closure args count mismatching with pipe span
Closes #55891
r? @estebank
2018-11-22 10:37:49 +01:00
bors
4bec59c93b
Auto merge of #56147 - petrochenkov:impice, r=nikomatsakis
...
resolve: Fix some asserts in import validation
The asserts are not actually correct in presence of ambiguity errors.
Fixes https://github.com/rust-lang/rust/issues/56125
2018-11-22 02:40:44 +00:00
Niko Matsakis
ebf3c8d8e9
add compile-pass annotation
2018-11-21 18:50:10 -05:00
bors
6612100de5
Auto merge of #56065 - oli-obk:min_const_fn_loop_ice, r=davidtwco
...
Replace the ICEing on const fn loops with an error
fixes #56035
2018-11-21 23:24:15 +00:00
Vadim Petrochenkov
1dc1124979
resolve: Fix some asserts in import validation
2018-11-22 01:13:09 +03:00
Niko Matsakis
2bd2fc9418
add regression test
2018-11-21 15:34:28 -05:00
Dan Aloni
fc284c1eee
Stabilize macro_literal_matcher
2018-11-21 21:31:46 +02:00
varkor
f039872766
Enclose type in backticks for "reached the recursion limit while auto-dereferencing" error
2018-11-21 16:06:24 +00:00
Masaki Hara
2ff6ffc872
Add tests for unsized-locals functions stability.
2018-11-21 22:20:22 +09:00
Masaki Hara
8ab5be13a3
Add tests verifying #50940 .
2018-11-21 22:20:22 +09:00
Masaki Hara
8b426232ee
Check arg/ret sizedness at ExprKind::Path.
2018-11-21 22:20:22 +09:00
bors
ee7bb94044
Auto merge of #56117 - petrochenkov:iempty, r=eddyb
...
resolve: Make "empty import canaries" invisible from other crates
Empty imports `use prefix::{};` are desugared into `use prefix::{self as _};` to make sure the prefix is checked for privacy/stability/etc.
This caused issues in cross-crate scenarios because gensyms are lost in crate metadata (the `_` is a gensym).
Fixes https://github.com/rust-lang/rust/issues/55811
2018-11-21 12:54:10 +00:00
Oliver Scherer
6db8c6c6d9
Explain why we do not overwrite qualification of locals
2018-11-21 11:58:28 +01:00
Oliver Scherer
22aebd57c8
Add regression test for overwriting qualifs by assignment
2018-11-21 11:47:44 +01:00
Oliver Scherer
e05b61ccd8
Fix a comment
2018-11-21 11:47:16 +01:00
Oliver Scherer
42a3f730c7
Tidy
2018-11-21 11:13:49 +01:00
Oliver Scherer
3c290a5326
Ensure assignments don't allow skipping projection checks
2018-11-21 10:42:40 +01:00
Oliver Scherer
301ce8b2aa
Properly assign to aggregate fields
2018-11-21 10:37:18 +01:00
Vadim Petrochenkov
1e4cf740cf
resolve: Make "empty import canaries" invisible from other crates
2018-11-21 03:59:25 +03:00
Vadim Petrochenkov
d4934c748f
Add a couple more tests
2018-11-21 01:28:07 +03:00
Vadim Petrochenkov
1af682a557
Stabilize extern_crate_item_prelude
2018-11-21 01:27:23 +03:00
varkor
b99f9f775c
Enclose type in backticks for "non-exhaustive patterns" error
...
This makes the error style consistent with the convention in error messages.
2018-11-20 21:48:13 +00:00
bors
c4cf115056
Auto merge of #55720 - RalfJung:const-eval-raw, r=oli-obk
...
Make const_eval_raw query return just an AllocId
r? @oli-obk
2018-11-20 18:08:12 +00:00
bors
3991bfbbc2
Auto merge of #55663 - varkor:must_use-traits, r=estebank
...
Allow #[must_use] on traits
Addresses https://github.com/rust-lang/rust/issues/55506 , but we'll probably want to add it to some library traits like `Iterator` before the issue is considered fixed. Fixes https://github.com/rust-lang/rust/issues/51560 .
`#[must_use]` is already permitted on traits, with no effect, so this seems like a bug fix, but I might be overlooking something. This currently warns for `impl Trait` or `dyn Trait` when the `Trait` is `#[must_use]` (although I don't think the latter is currently possible, so it's simply future-proofed).
2018-11-20 15:15:53 +00:00
Axary
88d60941da
improve error note
2018-11-20 14:43:16 +01:00
Oliver Scherer
3e081c7e82
Trailing newline
2018-11-20 12:28:24 +01:00
Oliver Scherer
f70abe8d07
Add sanity test for promotion and const_let
2018-11-20 11:33:46 +01:00