1504 Commits

Author SHA1 Message Date
Takanori Ishibashi
2e8d9d7a25 absoluate -> absolute 2018-07-01 17:37:42 +09:00
bors
bfc1ee4968 Auto merge of #51762 - petrochenkov:oh-hi-mark, r=oli-obk
hygiene: Implement transparent marks and use them for call-site hygiene in proc-macros

Fixes https://github.com/rust-lang/rust/issues/50050
2018-06-30 09:19:21 +00:00
bors
acf50b79be Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertj
Lowering cleanups [1/N]
2018-06-30 07:10:18 +00:00
Vadim Petrochenkov
84f1bc8b66 Address comments 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
b69d51162b Restore the old behavior of $crate in nested macro_rules
`$crate` is not resolved at def-site of a macro, but rather at "transitive def-site"
2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
9f92fce77c Fortify dummy span checking 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
99ecdb3f5f hygiene: Implement transparent marks 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
09856c85b7 expansion: Give names to some fields of SyntaxExtension 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
1328bdeef8 resolve: Cleanup resolve_crate_root 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
d7072b5bb4 Fix rebase 2018-06-28 11:04:51 +03:00
Vadim Petrochenkov
f0622dfe5d Use Idents for associated item definitions in HIR
Remove emulation of hygiene with gensyms
2018-06-28 11:04:50 +03:00
Vadim Petrochenkov
e8215a4f6f Use Idents for path segments in HIR 2018-06-28 11:04:50 +03:00
Vadim Petrochenkov
d347270e0c Implement #[macro_export(local_inner_macros)] 2018-06-27 13:10:16 +03:00
Oliver Schneider
9eb75613f0 Generate DefIds for the impl trait of async functions 2018-06-27 11:17:55 +02:00
Vadim Petrochenkov
fffe9fbb51 hygiene: More descriptive names for things involved in late hygienic name resolution 2018-06-23 20:09:21 +03:00
Vadim Petrochenkov
a12726460e expansion: Rename Expansion to AstFragment 2018-06-23 20:09:21 +03:00
Vadim Petrochenkov
869fa27d13 hygiene: Rename MarkKind to Transparency
Move `is_builtin` for `Mark` to a separate flag
2018-06-23 20:09:21 +03:00
Taylor Cramer
85e4866320 PathParameters -> GenericArgs fixes 2018-06-21 23:24:51 -07:00
Taylor Cramer
083a7eaa1a Add path parameters to std_path 2018-06-21 22:38:06 -07:00
Taylor Cramer
d64e577fa3 Async methods 2018-06-21 22:38:05 -07:00
Taylor Cramer
cf844b547d async await desugaring and tests 2018-06-21 22:36:36 -07:00
varkor
991efa4284 Address various comments 2018-06-20 12:23:33 +01:00
varkor
80dbe58efc Use ParamBounds in WhereRegionPredicate 2018-06-20 12:23:07 +01:00
varkor
aed530a457 Lift bounds into GenericParam 2018-06-20 12:22:46 +01:00
varkor
3bcb006fd9 Rename structures in ast 2018-06-20 12:21:52 +01:00
varkor
f457b3d10a Refactor generic parameters in rustdoc/clean 2018-06-20 12:21:52 +01:00
varkor
2c6ff2469a Refactor ast::GenericParam as a struct 2018-06-20 12:21:08 +01:00
varkor
d643946550 Rename ast::GenericParam and ast::GenericArg
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20 12:19:04 +01:00
varkor
76c0d68745 Rename "parameter" to "arg" 2018-06-20 12:19:04 +01:00
bors
862703e05e Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelix
Add existential type definitions

Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items.

r? @nikomatsakis
2018-06-18 14:34:52 +00:00
bors
c45ae9ea3a Auto merge of #51605 - ericfindlay:master, r=kennytm
Fixed minor error in Compiler Error Index, E0603.
2018-06-18 00:27:58 +00:00
Eric Findlay
1eff1d414f Fixed minor error in Compiler Error Index, E0603. 2018-06-17 11:35:53 +09:00
QuietMisdreavus
122b5b47c2 create multiple HIR items for a use statement 2018-06-14 17:47:28 -05:00
bors
ef8cb40c9c Auto merge of #51519 - ExpHP:issue-51331-b, r=petrochenkov
Fix for $crate var normalization in proc macro for externally defined macros

Fixes #51331, a bug that has existed in at least *some* form for a year and a half.

The PR includes the addition of a `fold_qpath` method to `syntax::fold::Folder`.  Overriding this method is useful for folds that modify paths in a way that invalidates indices (insertion or removal of a component), as it provides the opportunity to update `qself.position` in `<A as B>::C` paths.  I added it because the bugfix is messy without it.

(unfortunately, grepping around the codebase, I did not see anything else that could use it.)
2018-06-12 15:23:28 +00:00
Michael Lamparski
d13bfd294c fix issue #51331 by updating qself.position 2018-06-12 08:06:22 -04:00
Guillaume Gomez
dadfa13f47 Fix extern prelude failure in rustdoc 2018-06-11 22:24:35 +02:00
bors
7dc61f3022 Auto merge of #51461 - estebank:e0423-doc, r=petrochenkov
Update E0423 description

E0423 doesn't apply only to structs, update the error index description
to make this clear.

Fix #42077.
2018-06-11 00:32:22 +00:00
Esteban Küber
a6782d9e4e Update E0423 description
E0423 doesn't apply only to structs, update the error index description
to make this clear.
2018-06-09 14:27:42 -07:00
Mark Rousskov
4b176b2ce2
Rollup merge of #51360 - estebank:braces-around-literal-structs, r=nikomatsakis
Suggest parentheses when a struct literal needs them

When writing a struct literal in an expression that expects a block to
be started afterwards (like an `if` statement), do not suggest using the
same struct literal:

```
did you mean `S { /* fields * /}`?
```

Instead, suggest surrounding the expression with parentheses:

```
did you mean `(S { /* fields * /})`?
```

Fix #47360, #50090. Leaving #42982 open to come back to this problem with a better solution.
2018-06-08 17:21:00 -06:00
Mark Rousskov
91b6842dc9
Rollup merge of #50143 - petrochenkov:mexuniq, r=nikomatsakis
Add deprecation lint for duplicated `macro_export`s

cc https://github.com/rust-lang/rust/issues/35896#issuecomment-381370556
2018-06-08 17:20:55 -06:00
Oliver Schneider
9b1bd94e37 Add existential type definitons 2018-06-07 17:33:53 +02:00
Esteban Küber
377cf44b4e Suggest braces when a struct literal needs them
When writing a struct literal in an expression that expects a block to
be started afterwards (like an `if` statement), do not suggest using the
same struct literal:

```
did you mean `S { /* fields * /}`?
```

Instead, suggest surrounding the expression with parentheses:

```
did you mean `(S { /* fields * /})`?
```
2018-06-04 18:47:47 -07:00
Mark Simulacrum
19e0b7da1c Remove is_import field 2018-06-03 11:29:44 -06:00
Matt Brubeck
72ab4b4f01 Add std/core to prelude if extern_prelude enabled
Fixes #50605
2018-05-31 06:37:53 -07:00
Vadim Petrochenkov
345e7c3597 resolve: Make sure indeterminate and inconsistent macro resolutions always generate errors 2018-05-30 22:21:50 +03:00
Vadim Petrochenkov
11c283cdfc Prohibit duplicate macro_exports 2018-05-30 16:15:35 +03:00
Vadim Petrochenkov
1e4269cb83 Add Ident::as_str helper 2018-05-26 15:20:23 +03:00
Vadim Petrochenkov
e60eaf59df Fix naming conventions for new lints 2018-05-25 02:35:07 +03:00
bors
b4463d788b Auto merge of #50943 - oli-obk:cleanups, r=estebank
impl Trait diagnostic/test cleanups
2018-05-24 03:40:16 +00:00
Niko Matsakis
2249d65392 "crate-ify" paths that begin with a renamed crate 2018-05-23 16:21:44 -04:00