Commit Graph

83610 Commits

Author SHA1 Message Date
Vadim Petrochenkov
d0aaf895ee resolve: Future proof resolutions for potentially built-in attributes 2018-09-11 00:30:44 +03:00
Vadim Petrochenkov
730c5de281 resolve: Support resolving identifier macros without their own ID
Invocation/expansion ID (aka `Mark`) is not really necessary for resolving a macro path.
What is really necessary is its parent module, parent expansion and parent legacy scope.
This is required for validation resolutions of built-in attributes, which don't get their own `Mark`s
2018-09-11 00:30:44 +03:00
Niko Matsakis
f95f23f0c3 fix incremental test
We are now carrying the user-given type through MIR, so it makes sense
that this would change the hash.
2018-09-10 17:24:43 -04:00
Niko Matsakis
5adbdf82f3 add test case 2018-09-10 17:21:01 -04:00
Niko Matsakis
b1a9f9eae8 visit the paths in pre-expansion macros 2018-09-10 17:12:55 -04:00
Niko Matsakis
38774aaf7f make add_pre_expansion_builtin add a pre-expansion lint
Copy-and-paste error.
2018-09-10 17:10:11 -04:00
Niko Matsakis
df37678b76 add FIXME related to ref x bindings 2018-09-10 14:12:20 -04:00
bors
551244f05b Auto merge of #54093 - petrochenkov:noinner, r=alexcrichton
Feature gate non-builtin attributes in inner attribute position

Closes item 3 from https://github.com/rust-lang/rust/pull/50911#issuecomment-411605393
2018-09-10 17:18:27 +00:00
Alex Crichton
5595aeb6b7 Add rustc SHA to released DWARF debuginfo
This commit updates the debuginfo that is encoded in all of our released
artifacts by default. Currently it has paths like `/checkout/src/...` but these
are a little inconsistent and have changed over time. This commit instead
attempts to actually define the file paths in our debuginfo to be consistent
between releases.

All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git
sha of the released compiler. Sub-paths are all paths into the git repo at that
`$sha`.
2018-09-10 10:10:38 -07:00
Val
abe0f027ae
fix typos in growth algo description
modified to read "the first table overflows into the second, and the second into the first." plus smaller typos
2018-09-10 09:02:16 -07:00
flip1995
c549e656aa
Reexport CheckLintNameResult 2018-09-10 17:13:31 +02:00
Niko Matsakis
2b6f9664ed add link to https://github.com/rust-lang/rust/issues/54105 2018-09-10 11:03:11 -04:00
Niko Matsakis
e87bf30f5f propagate user-ascribes types down onto resulting bindings
But only in very simple cases.
2018-09-10 10:58:31 -04:00
Niko Matsakis
a8710539cb expand the patterns test with a bunch more scenarios 2018-09-10 09:39:43 -04:00
bors
3c3e372e18 Auto merge of #54000 - jkozlowski:fix-53174, r=cramertj
Allow named lifetimes in async functions.

- Fixes #53174

Code by @eddyb; @cramertj suggested I lift it off another change so we can fix #53174.

r? @cramertj
2018-09-10 12:58:04 +00:00
Jorge Aparicio
d37658afbd bump version 2018-09-10 14:34:04 +02:00
Niko Matsakis
2f6628ecec optimize let x: T = .. to avoid a temporary
For some weird reason this fixes `intrinsic-move-val`. It also affects
various test heuristics. I removed one test (`reborrow_basic`) that
didn't seem to really be testing anything in particular anymore,
compared to all the other tests we've got.
2018-09-10 08:28:56 -04:00
Niko Matsakis
16f4e8ac1d generalize AscribeUserType to handle sub or super type 2018-09-10 08:28:31 -04:00
Niko Matsakis
9c5e7941ef WIP remove incorrect nll.stderr reference files 2018-09-10 08:22:31 -04:00
Niko Matsakis
fced2b1200 fix SCCs containing mixture of universes
And add a test showing a universe violation getting caught.
2018-09-10 08:22:31 -04:00
Niko Matsakis
f0e3a09bb8 fixup: rename UserAssertTy to AscribeUserType
This is some rebase pain.
2018-09-10 08:22:31 -04:00
Niko Matsakis
05a6e1e73f pacify the mercilous tidy 2018-09-10 08:22:31 -04:00
Niko Matsakis
7e1b97884b insert AscribeUserType for ascriptions 2018-09-10 08:22:31 -04:00
Niko Matsakis
dd3cc9669a add the AscribeUserType statement kind
Make it have the semantics of subtype.
2018-09-10 08:22:31 -04:00
Niko Matsakis
22f9bcce04 matches/mod.rs: rustfmt 2018-09-10 08:22:31 -04:00
Niko Matsakis
50754d0513 add a AscribeUserType pattern, largely ignored 2018-09-10 08:22:31 -04:00
Niko Matsakis
4b5f19a0b0 remove the old UserAssertTy support 2018-09-10 08:22:31 -04:00
Niko Matsakis
34575e693b now that we can handle subtyping, fix higher-ranked equality 2018-09-10 08:22:31 -04:00
Niko Matsakis
07e21b1e4b add a test for variables used twice 2018-09-10 08:22:31 -04:00
bors
595345419d Auto merge of #54011 - eddyb:anchored-in-the-future, r=petrochenkov
rustc_resolve: inject `uniform_paths` canaries regardless of the feature-gate, on Rust 2018.

This PR is an attempt at future-proofing "anchored paths" by emitting the same ambiguity errors that `#![feature(uniform_paths)]` would, with slightly changed phrasing (see added UI tests).

Also, on top of #54005, this PR allows this as well:
```rust
use crate_name;
use crate_name::foo;
```
In that any ambiguity between an extern crate and an import *of that same crate* is ignored.

r? @petrochenkov cc @aturon @Centril @joshtriplett
2018-09-10 10:28:53 +00:00
Guillaume Gomez
1a0e8f95f5 Remove namespace for keywords 2018-09-10 11:27:21 +02:00
Eduard-Mihai Burtescu
d5da94a3b1 rustc_resolve: ignore uniform_paths canaries that resolve to an import of the same crate. 2018-09-10 11:48:46 +03:00
Eduard-Mihai Burtescu
0a33de04cf rustc_resolve: inject uniform_paths canaries regardless of the feature-gate, on Rust 2018. 2018-09-10 11:48:46 +03:00
bors
b8d45da274 Auto merge of #53565 - PramodBisht:issue/53359_b, r=estebank
#53359: putting multiple unresolved import on single line

r? @estebank
Here is WIP implementation of #53359
this PR have clubbed multiple unresolved imports into a single line.
I think still two things need to improve like giving specific `label message` for each span of multi_span(how we can do this?) and second we are getting a warning while compiling, stating something like `E0432` have been passed before.
2018-09-10 07:48:45 +00:00
bors
fb945f0ebb Auto merge of #53854 - davidtwco:issue-53668, r=nikomatsakis
if- and while-let-chains, take 2 - edition changes

Part of #53668.

r? @nikomatsakis
2018-09-10 04:05:14 +00:00
kenta7777
69deed9dc1 renamed t_nil to t_unit 2018-09-10 11:21:30 +09:00
kenta7777
2be5c722de renamed mk_nil_ptr to mk_unit_ptr 2018-09-10 11:09:54 +09:00
kenta7777
5c3ba4aa4f renamed mk_nil to mk_unit 2018-09-10 11:07:13 +09:00
kenta7777
6f685ffad4 renamed is_nil to is_unit 2018-09-10 10:45:16 +09:00
bors
fdcd4a4a45 Auto merge of #53936 - petrochenkov:2macpre, r=alexcrichton
resolve: Split macro prelude into built-in and user-defined parts

This is a refactoring that will help to remove `unshadowable_attrs` when https://github.com/rust-lang/rust/pull/53410 lands.

UPDATE: The second commit actually removes `unshadowable_attrs`.
2018-09-10 01:42:11 +00:00
kenta7777
37d0600c23 renamed read_nil to read_unit 2018-09-10 10:36:07 +09:00
kenta7777
d02a5ffaed renamed emit_nil to emit_unit 2018-09-10 10:31:37 +09:00
Vadim Petrochenkov
62c7d78a9a resolve: Remove unshadowable_attrs 2018-09-10 04:04:51 +03:00
Vadim Petrochenkov
a25c841e88 resolve: Split macro prelude into built-in and user-defined parts 2018-09-10 04:00:48 +03:00
Vadim Petrochenkov
615eaba14b Feature gate non-builtin attributes in inner attribute position 2018-09-10 03:35:47 +03:00
Esteban Küber
014a56ca9c Don't compute padding of braces unless they are unmatched 2018-09-09 14:55:46 -07:00
bors
2d4e34ca8b Auto merge of #53778 - petrochenkov:shadrelax2, r=nikomatsakis
resolve: Relax shadowing restrictions on macro-expanded macros

Previously any macro-expanded macros weren't allowed to shadow macros from outer scopes.
Now only "more macro-expanded" macros cannot shadow "less macro-expanded" macros.
See comments to `fn may_appear_after` and added tests for more details and examples.

The functional changes are a21f6f588fc28c97533130ae44a6957b579ab58c and 46dd365ce9ca0a6b8653849b80267763c542842a, other commits are refactorings.
2018-09-09 21:00:55 +00:00
Jorge Aparicio
442947199c update ui tests 2018-09-09 22:08:42 +02:00
Matthew Jasper
54f7311587 Suggest a let binding to extend temporary lifetimes with NLL 2018-09-09 19:43:46 +01:00
Matthew Jasper
ea6fe08751 Split explain_why_borrow_contains_point into two functions
Allows callers to change other parts of their message based on the
explanation
2018-09-09 19:43:10 +01:00