Chris Stankus
6a1efbd08e
Merge branch 'master' into E0403-update-error-format
2016-08-17 12:31:20 -05:00
Jonathan Turner
fbc62afba6
Rollup merge of #35726 - mikhail-m1:master2, r=jonathandturner
...
update E0409 to new error format
fixes #35699 as part of #35233 .
r? @jonathandturner
2016-08-17 06:25:28 -07:00
Jonathan Turner
5fc58dcaff
Rollup merge of #35722 - knight42:update-error-msg, r=jonathandturner
...
Updated E0394 & E0422 to new format
Fixes #35692 and #35700 , as part of #35233 .
r? @jonathandturner
2016-08-17 06:25:27 -07:00
Jonathan Turner
02a8e2c285
Rollup merge of #35670 - RockyTV:e0365, r=jonathandturner
...
Update error E0365 to new format
Fixes #35633 as part of #35233 .
r? @jonathandturner
2016-08-17 06:25:25 -07:00
Eduard Burtescu
c1cfd58cbd
rustc: remove SelfSpace from ParamSpace.
2016-08-17 05:50:57 +03:00
Chris Stankus
f0ff2d32c8
E0403 update error format
2016-08-16 20:49:09 -05:00
Mikhail Modin
193b9ae86b
update to new error format E0409
2016-08-16 22:13:09 +03:00
Knight
d2e78956c3
Updated E0422 to new error message
2016-08-17 03:02:25 +08:00
Alexandre Oliveira
a026e2c727
Update error E0365 to new format
2016-08-14 16:33:25 -03:00
Eduard-Mihai Burtescu
812a8c1e33
Rollup merge of #35596 - crypto-universe:E0254_style_and_tests, r=jonathandturner
...
Add label to E0254
This issue #35513 is a part of #35233 .
r? @jonathandturner
2016-08-14 20:29:50 +03:00
Eduard-Mihai Burtescu
9c347b93a4
Rollup merge of #35558 - lukehinds:master, r=nikomatsakis
...
Update error message for E0253 #35512
Fixes #35512 . Part of #35233 .
2016-08-14 20:29:49 +03:00
bors
8787a12334
Auto merge of #35592 - jonathandturner:rollup, r=jonathandturner
...
Rollup of 23 pull requests
- Successful merges: #35279 , #35331 , #35358 , #35375 , #35445 , #35448 , #35482 , #35486 , #35505 , #35528 , #35530 , #35532 , #35536 , #35537 , #35541 , #35552 , #35554 , #35555 , #35557 , #35562 , #35565 , #35569 , #35576
- Failed merges: #35395 , #35415 , #35563
2016-08-11 13:14:28 -07:00
crypto-universe
4209f948b1
Add label to E0254
...
This issue #35513 is a part of #35233 .
r? @jonathandturner
2016-08-11 20:15:10 +02:00
Jonathan Turner
d3af9a38ed
Fix tidy warning
2016-08-11 10:17:12 -07:00
Jonathan Turner
294ac7b561
Rollup merge of #35536 - hank-der-hafenarbeiter:E0433, r=jonathandturner
...
Updated E0433 to new error message. (no bonus)
Part of #35345
r? @jonathandturner
2016-08-11 06:33:59 -07:00
petrochenkov
08f0f7c54a
Substitute private type aliases in rustdoc
2016-08-11 00:32:07 +03:00
Niko Matsakis
ae9c049cfc
remove field that need not be public
2016-08-09 20:28:46 -04:00
Luke Hinds
5c2c19aa89
Update error message for E0253 #35512
...
Fixes #35512 . Part of #35233 .
2016-08-09 22:34:23 +01:00
hank-der-hafenarbeiter
ee076dd937
Updated E0433 to new error message. (no bonus)
2016-08-09 00:26:43 +02:00
bors
f5e7a5910d
Auto merge of #35362 - medzin:E0252, r=GuillaumeGomez
...
Updated error message E0252
Fixes #35306 as part of #35233 .
r? @GuillaumeGomez
2016-08-07 05:48:47 -07:00
Eduard-Mihai Burtescu
c846c30584
Rollup merge of #35363 - GuillaumeGomez:err_codes, r=jonathandturner
...
Err codes
r? @jonathandturner
2016-08-06 15:01:21 +03:00
Adam Medziński
f4dd1f9500
Updated error message E0252
2016-08-06 13:31:03 +02:00
bors
7bf54f90d6
Auto merge of #35116 - jseyfried:groundwork_for_new_import_semantics, r=nrc
...
resolve: diagnostics improvement and groundwork for RFC 1560
Fixes #35115 , fixes #35135 , and lays groundwork for #32213 (cc #35120 ).
r? @nrc
2016-08-05 14:42:42 -07:00
Guillaume Gomez
7cd1779c31
Add new error code tests
2016-08-05 13:17:39 +02:00
Ryan Scott
19e140b946
Update E0404 to new format.
2016-08-05 17:36:43 +09:00
Guillaume Gomez
8787237651
Add E0254 error explanation
2016-08-05 00:23:42 +02:00
Jeffrey Seyfried
a18fc76049
Refactor directive.import(binding)
-> resolver.import(binding, directive)
.
2016-08-01 19:10:07 +00:00
Jeffrey Seyfried
0db8ca6ca2
nit: rename module_
-> module
2016-08-01 19:10:05 +00:00
Jeffrey Seyfried
6372a6d7c2
Improve diagnostics for pattern bindings that illegally shadow items.
...
Improve unused import detection.
2016-08-01 19:09:58 +00:00
Jeffrey Seyfried
07c706b57c
Clean up resolver.record_use()
.
2016-08-01 19:06:47 +00:00
Jeffrey Seyfried
b107a4e4f6
Refactor module.try_define_child(..)
-> resolver.try_define(module, ..)
.
2016-08-01 19:06:45 +00:00
Jeffrey Seyfried
096c3ed6c6
Refactor away resolution.try_define()
.
2016-08-01 19:06:44 +00:00
Jeffrey Seyfried
5868e78b09
Refactor away resolution.report_conflicts()
.
2016-08-01 19:06:43 +00:00
Jeffrey Seyfried
79e82b5c41
Implement Deref
for ImportResolver
to Resolver
.
2016-08-01 19:06:41 +00:00
Jeffrey Seyfried
d6b10beb88
Make "type aliases cannot be used for traits" a note instead of a span_label.
2016-07-31 21:29:01 +00:00
Jeffrey Seyfried
93fd214d61
Clean up resolve_trait_reference
.
2016-07-31 20:40:03 +00:00
Jeffrey Seyfried
46bd5d3fa0
Avoid emitting a unhelpful cascading resolution error.
2016-07-31 20:17:08 +00:00
Manish Goregaokar
8c6421fb17
Rollup merge of #35063 - jseyfried:avoid_importing_inaccessible_names, r=nrc
...
resolve: Exclude inaccessible names from single imports
If a single import resolves to an inaccessible name in some but not all namespaces, avoid importing the name in the inaccessible namespaces.
Currently, the inaccessible namespaces are imported but cause a privacy error when used.
r? @nrc
2016-07-30 13:44:46 +05:30
Jeffrey Seyfried
132bff9933
If a single import resolves to an inaccessible name in some but not all namespaces,
...
avoid importing the name in the inaccessible namespaces.
Currently, the inaccessible namespaces are imported but cause a privacy error when used.
2016-07-27 05:17:04 +00:00
Vadim Petrochenkov
d7a968eb1c
Fix ICE happening when unresolved imports are used in patterns
2016-07-21 21:19:16 +03:00
Jeffrey Seyfried
44575f708a
Rename mtwt
to hygiene
2016-07-17 17:12:35 +00:00
Jeffrey Seyfried
76ed445622
Clean up and encapsulate syntax::ext::mtwt
2016-07-17 17:12:32 +00:00
bors
4db1874f4c
Auto merge of #34570 - jseyfried:no_rename, r=nrc
...
Simplify the macro hygiene algorithm
This PR removes renaming from the hygiene algorithm and treats differently marked identifiers as unequal.
This change makes the scope of identifiers in `macro_rules!` items empty. That is, identifiers in `macro_rules!` definitions do not inherit any semantics from the `macro_rules!`'s scope.
Since `macro_rules!` macros are items, the scope of their identifiers "should" be the same as that of other items; in particular, the scope should contain only items. Since all items are unhygienic today, this would mean the scope should be empty.
However, the scope of an identifier in a `macro_rules!` statement today is the scope that the identifier would have if it replaced the `macro_rules!` (excluding anything unhygienic, i.e. locals only).
To continue to support this, this PR tracks the scope of each `macro_rules!` and uses it in `resolve` to ensure that an identifier expanded from a `macro_rules!` gets a chance to resolve to the locals in the `macro_rules!`'s scope.
This PR is a pure refactoring. After this PR,
- `syntax::ext::expand` is much simpler.
- We can expand macros in any order without causing problems for hygiene (needed for macro modularization).
- We can deprecate or remove today's `macro_rules!` scope easily.
- Expansion performance improves by 25%, post-expansion memory usage decreases by ~5%.
- Expanding a block is no longer quadratic in the number of `let` statements (fixes #10607 ).
r? @nrc
2016-07-15 08:48:41 -07:00
Jeffrey Seyfried
c83e31e7c9
Include the MacroDefinition
rib in the label ribs.
2016-07-15 05:16:21 +00:00
Jeffrey Seyfried
0701571fe7
Implement macro_rules!
placeholders and the macro scope map
2016-07-14 01:34:37 +00:00
Jeffrey Seyfried
a15dfca54f
Instead of renaming, treat differently marked identifiers as unequal
2016-07-14 01:34:31 +00:00
Jeffrey Seyfried
195a27faab
Move node id assigning into resolve
2016-07-14 01:30:19 +00:00
Michael Rosenberg
5a99d79857
Fixed issue where importing a trait method directly and then calling the method causes a compiler panic
2016-07-13 02:34:10 -04:00
petrochenkov
d27e55c5d8
Stabilize FnOnce::Output
+ Fix rebase
2016-07-08 13:35:17 +03:00
Vadim Petrochenkov
eb32440d45
Do not generate Def::Err in bindings
...
Instead of Def::Err erroneous bindings can get usual definitions that doesn't require special cases later on and have less chances to generate ICE.
2016-07-08 12:42:57 +03:00