Esteban Küber
0952856e6c
Suggest an appropriate token when encountering pub Ident<'a>
2018-11-30 11:48:08 -08:00
Guillaume Gomez
3b64f86beb
Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavis
...
Clean up span in non-trailing `..` suggestion
2018-11-29 13:10:54 +01:00
Guillaume Gomez
1fe2085441
Rollup merge of #56322 - petrochenkov:edlints, r=eddyb
...
resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`
Fixes https://github.com/rust-lang/rust/issues/56311 (stable-to-beta regression)
2018-11-29 13:10:53 +01:00
Guillaume Gomez
796892e0ef
Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakis
...
Suggest appropriate place for lifetime when declared after type arguments
2018-11-29 13:10:39 +01:00
Guillaume Gomez
aebf07e3eb
Rollup merge of #56114 - varkor:nonexhaustive-backticks, r=nikomatsakis
...
Enclose type in backticks for "non-exhaustive patterns" error
This makes the error style consistent with the convention in error messages.
2018-11-29 13:10:33 +01:00
bors
5a03532ea9
Auto merge of #56245 - mark-i-m:stabilize_ques_kleene, r=alexcrichton
...
Stabilize feature `macro_at_most_once_rep`
a.k.a. `?` Kleene operator 🎉
cc #48075
r? @Centril
2018-11-29 06:44:12 +00:00
Esteban Küber
66a2c39290
Clean up span in non-trailing .. suggestion
2018-11-28 16:05:02 -08:00
Vadim Petrochenkov
d77edb6458
resolve: Fix false-positives from lint absolute_paths_not_starting_with_crate
2018-11-28 22:57:25 +03:00
Mark Mansi
5d7717360c
fix test
2018-11-27 18:21:10 -06:00
Mark Mansi
aeede9eb46
fix test
2018-11-27 13:13:11 -06:00
Mark Mansi
e97edad935
update tests
2018-11-27 13:13:11 -06:00
bors
400c2bc5ed
Auto merge of #56264 - petrochenkov:typonly, r=nikomatsakis
...
resolve: Extern prelude is for type namespace only
Fixes https://github.com/rust-lang/rust/issues/56263 (stable-to-beta regression)
2018-11-27 19:04:44 +00:00
bors
aeff91d977
Auto merge of #56251 - scalexm:root-universe, r=nikomatsakis
...
Put all existential ty vars in the `ROOT` universe
r? @nikomatsakis
2018-11-27 15:54:21 +00:00
bors
10e2c729ea
Auto merge of #55402 - estebank:macro-eof-2, r=nikomatsakis
...
Point at end of macro arm when encountering EOF
Fix #52866 .
2018-11-27 12:31:45 +00:00
Vadim Petrochenkov
cd2e98dbd3
resolve: Extern prelude is for type namespace only
2018-11-27 14:35:36 +03:00
Vadim Petrochenkov
6f13708299
resolve: Suggest crate:: for resolving ambiguities when appropriate
...
More precise spans for ambiguities from macros
2018-11-27 00:34:25 +03:00
Vadim Petrochenkov
d1862b4196
resolve: Fallback to extern prelude in 2015 imports used from global 2018 edition
2018-11-27 00:34:24 +03:00
Vadim Petrochenkov
c06e69ee70
resolve: Fallback to uniform paths in 2015 imports used from global 2018 edition
2018-11-27 00:32:34 +03:00
Vadim Petrochenkov
dae4c7b1ff
resolve: Implement edition hygiene for imports and absolute paths
...
Use per-span hygiene in a few other places in resolve
Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-27 00:32:30 +03:00
Vadim Petrochenkov
fba116fc5f
Remove duplicate tests for uniform paths
2018-11-27 00:30:50 +03:00
scalexm
efb2949b93
Put all existential ty vars in the ROOT universe
2018-11-26 20:37:43 +01:00
Esteban Küber
45dfe43887
Emit one diagnostic for multiple misplaced lifetimes
2018-11-26 08:32:47 -08:00
bors
b51632e3f0
Auto merge of #56070 - oli-obk:const_let, r=eddyb
...
Allow assignments in const contexts
fixes https://github.com/rust-lang/rust/issues/54098
fixes https://github.com/rust-lang/rust/issues/51251
fixes https://github.com/rust-lang/rust/issues/52613
2018-11-26 08:17:36 +00:00
Esteban Küber
234d043d18
Move lifetimes before the *first* type argument
2018-11-25 12:51:04 -08:00
Esteban Küber
79ee8f329d
Suggest appropriate place for lifetime when declared after type arguments
2018-11-25 12:41:38 -08:00
Pietro Albini
cd17b1d4b6
Rollup merge of #56211 - petrochenkov:fwd, r=petrochenkov
...
[master] Forward-ports from beta
https://github.com/rust-lang/rust/pull/56206 + one commit from https://github.com/rust-lang/rust/pull/55884 that was accidentally missing in https://github.com/rust-lang/rust/pull/56042 due to an off-by-one mistake in commit ranges
r? @ghost
2018-11-25 17:05:12 +01:00
Pietro Albini
d21d510dde
Rollup merge of #56207 - SimonSapin:int_to_from_bytes, r=nagisa
...
Stabilize the int_to_from_bytes feature
Fixes #52963
FCP to merge completed: https://github.com/rust-lang/rust/issues/52963#issuecomment-416548327
2018-11-25 17:05:10 +01:00
Pietro Albini
dcae83b6a3
Rollup merge of #56204 - estebank:suggest-variant, r=zackmdavis
...
Suggest correct enum variant on typo
Fix #37992 .
2018-11-25 17:05:09 +01:00
Pietro Albini
b16d8eb3f2
Rollup merge of #56072 - da-x:stabilize-literal-matcher, r=petrochenkov
...
Stabilize macro_literal_matcher
This followed FCP in #35625 .
Closes #35625
2018-11-25 17:05:00 +01:00
Pietro Albini
6c2513c0d3
Rollup merge of #56045 - qnighy:additional-sizedness, r=cramertj
...
Check arg/ret sizedness at ExprKind::Path
This PR solves three problems:
- #50940 : ICE on casting unsized tuple struct constructors
- Unsized tuple struct constructors were callable in presence of `unsized_locals`.
- https://github.com/rust-lang/rust/issues/48055#issuecomment-437178966 : we cannot relax `Sized` bounds on stable functions because of fn ptr casting
These are caused by lack of `Sized`ness checks for arguments/retvals at **reference sites of `FnDef` items** (not call sites of the functions). Therefore we can basically add more `Sized` obligations on typeck. However, adding `Sized` obligations arbitrarily breaks type inference; to prevent that I added a new method `require_type_is_sized_deferred` which doesn't interfere usual type inference.
2018-11-25 17:04:58 +01:00
Pietro Albini
1aa3ffaf99
Rollup merge of #56024 - oli-obk:const_fn_collect_inner, r=michaelwoerister
...
Don't auto-inline const functions
fixes #53451
2018-11-25 17:04:57 +01:00
Vadim Petrochenkov
fe548e311a
resolve: Fix some more asserts in import validation
2018-11-25 16:41:29 +03:00
Vadim Petrochenkov
e593431bc7
resolve: Fix bad span arithmetics in import conflict diagnostics
2018-11-25 16:41:16 +03:00
Vadim Petrochenkov
d4a78da543
resolve: Prohibit relative paths in visibilities on 2018 edition
2018-11-25 16:40:03 +03:00
Simon Sapin
68a26ec647
Stabilize the int_to_from_bytes feature
...
Fixes #52963
2018-11-25 08:29:01 +01:00
bors
abe19a7305
Auto merge of #55921 - scalexm:placeholders, r=nikomatsakis
...
Add placeholder types
Fixes #48696 (handle universes in canonicalization of type inference vars), and fixes #55098 .
2018-11-25 06:48:21 +00:00
bors
37961dbd2d
Auto merge of #55959 - matthewjasper:remove-end-region, r=nikomatsakis
...
Cleanup from lexical MIR borrowck removal
Lexical MIR borrowck was removed months ago now, and `EndRegion`s are no longer used for MIRI verification.
* Remove `rustc::mir::StatementKind::EndRegion` and the `-Zemit_end_regions` flag
* Use `RegionVid` instead of `Region` in BorrowSet
* Rewrite drop generation to create fewer goto terminators.
r? @nikomatsakis
2018-11-25 03:00:30 +00:00
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