Alex Burka
1ec3005e45
fix fallout from libsyntax enumpocalypse
2016-02-27 02:01:41 -05:00
Alex Burka
37a4cb3212
feature-gate inclusive range syntax
2016-02-27 02:01:41 -05:00
Alex Burka
5daf13cae3
libsyntax: parse inclusive ranges
2016-02-27 02:01:41 -05:00
Manish Goregaokar
a48f95879d
Rollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakis
...
This PR changes the visibility of extern crate declarations to match that of items (fixes #26775 ).
To avoid breakage, the PR makes it a `public_in_private` lint to reexport a private extern crate, and it adds the lint `inaccessible_extern_crate` for uses of an inaccessible extern crate.
The lints can be avoided by making the appropriate `extern crate` declaration public.
2016-02-25 11:41:01 +05:30
Jeffrey Seyfried
3358fb11da
Fix the visibility of extern crate declarations and stop warning on pub extern crate
2016-02-24 01:34:14 +00:00
Corey Farwell
bc2f5e2612
Use associated functions for libsyntax SepSeq constructors.
2016-02-22 23:24:42 -05:00
Alex Crichton
95761417c3
rustbuild: Sync some Cargo.toml/lib.rs dependencies
...
The standard library doesn't depend on rustc_bitflags, so move it to explicit
dependencies on all other crates. Additionally, the arena/fmt_macros deps could
be dropped from libsyntax.
2016-02-21 09:49:13 -08:00
Jonas Schievink
11e0ba4340
Do less panicking in general
2016-02-19 14:43:13 +01:00
Corey Farwell
5850d16d52
Remove unnecessary explicit lifetime bounds.
...
These explicit lifetimes can be ommitted because of lifetime elision
rules. Instances were found using rust-clippy.
2016-02-18 08:37:10 -05:00
bors
4d3eebff9d
Auto merge of #31707 - GuillaumeGomez:macro_name, r=sfackler
...
I'm wondering if instead of a second help message, a note would be better. I let it up to reviewers.
2016-02-17 19:15:53 +00:00
bors
0d1cd9bd6a
Auto merge of #31685 - petrochenkov:patrefact2, r=eddyb
...
And split `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::Path`.
This is the HIR part of https://github.com/rust-lang/rust/pull/31581 .
This is also kind of a preparation for https://github.com/rust-lang/rfcs/pull/1492 .
r? @eddyb
2016-02-17 06:01:49 +00:00
ggomez
eca0ab25d8
Add check on find_best_match_for_name and improve help message for undefined macro
2016-02-16 22:30:08 +01:00
bors
9658645407
Auto merge of #31534 - jseyfried:restrict_noninline_mod, r=nikomatsakis
...
This PR disallows non-inline modules without path annotations that are either in a block or in an inline module whose containing file is not a directory owner (fixes #29765 ).
This is a [breaking-change].
r? @nikomatsakis
2016-02-16 19:34:57 +00:00
Jonas Schievink
3a872782d3
Move more uses of panictry! out of libsyntax
...
[breaking-change] for syntax extensions
2016-02-16 13:32:40 +01:00
Vadim Petrochenkov
06755d90ce
Split PatKind::Enum into PatKind::TupleStruct and PatKind::Path
2016-02-16 00:40:38 +03:00
Nick Cameron
73a8513b88
Rebasing
2016-02-15 13:14:31 +13:00
Nick Cameron
847a0d2150
Some error recovery in the parser
2016-02-15 09:33:21 +13:00
Nick Cameron
ffd2a0b9d7
Add some simple error recovery to the parser and fix tests
...
Some tests just add the extra errors, others I fix by doing some simple error recovery. I've tried to avoid doing too much in the hope of doing something more principled later.
In general error messages are getting worse at this stage, but I think in the long run they will get better.
2016-02-15 09:30:23 +13:00
Nick Cameron
0ef9c5f585
error correction for missing or mismatched closing brackets
2016-02-15 09:30:23 +13:00
Nick Cameron
36a9f0cff1
refactoring: inline some function in the parser
2016-02-15 09:30:23 +13:00
bors
9d98390765
Auto merge of #31581 - petrochenkov:patrefact, r=Manishearth
...
cc https://github.com/rust-lang/rust/pull/31487#issuecomment-182945101
plugin-[breaking-change]
The first commit renames `ast::Pat_` to `ast::PatKind` and uses its variants in enum qualified form. I've also taken the opportunity and renamed `PatKind::Region` into `PatKind::Ref`.
The second commit splits `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::UnitStruct`.
So, pattern kinds now correspond to their struct/variant kinds - `Struct`, `TupleStruct` and `UnitStruct`.
@nikomatsakis @nrc @arielb1 Are you okay with this naming scheme?
An alternative possible naming scheme is `PatKind::StructVariant`, `PatKind::TupleVariant`, `PatKind::UnitVariant` (it's probably closer to the common use, but I like it less).
I intend to apply these changes to HIR later, they should not necessarily go in the same nightly with https://github.com/rust-lang/rust/pull/31487
r? @Manishearth
2016-02-14 06:18:10 +00:00
Manish Goregaokar
1407645f17
Rollup merge of #31609 - erickt:nit, r=sfackler
2016-02-14 05:06:35 +05:30
Vadim Petrochenkov
9f414a44a7
Split ast::PatKind::Enum into tuple struct and path patterns
2016-02-13 15:51:27 +03:00
Vadim Petrochenkov
14adc9bb63
Rename ast::Pat_ and its variants
2016-02-13 13:49:24 +03:00
Jeffrey Seyfried
d21e908175
Disallow non-inline modules without path annotations inside blocks and fix fallout
2016-02-13 07:05:28 +00:00
Jeffrey Seyfried
dbc2466f09
Only consider a module to be a directory owner if it is located within a directory owner
2016-02-13 07:01:41 +00:00
Erick Tryzelaar
e56cb87f30
syntax: Replace unstable vec.as_slice().get() with vec.get()
2016-02-12 10:59:26 -08:00
Jonas Schievink
c877d61b15
Use more autoderef in libsyntax
2016-02-12 19:28:42 +01:00
bors
c7640aa2aa
Auto merge of #31583 - petrochenkov:indi_ast, r=Manishearth
...
cc #31487
plugin-[breaking-change]
The AST part of https://github.com/rust-lang/rust/pull/30087
r? @Manishearth
2016-02-12 14:56:20 +00:00
bors
4b2c7030fd
Auto merge of #30830 - arcnmx:static-extern, r=alexcrichton
...
See #29676
r? @alexcrichton
2016-02-12 02:16:13 +00:00
Vadim Petrochenkov
77cc5764b9
Remove some unnecessary indirection from AST structures
2016-02-11 23:33:09 +03:00
Alex Crichton
2581b14147
bootstrap: Add a bunch of Cargo.toml files
...
These describe the structure of all our crate dependencies.
2016-02-11 11:12:32 -08:00
arcnmx
0ff055ad66
Pass through diagnostic handler instead
2016-02-11 12:45:52 -05:00
arcnmx
a141c52816
Use find_export_name_attr instead of string literal
2016-02-11 12:45:52 -05:00
arcnmx
32328ac6ff
Remove link_section and linkage as extern indicators
2016-02-11 12:45:52 -05:00
arcnmx
e6f0f7d52d
Only retain external static symbols across LTO
2016-02-11 12:45:52 -05:00
Oliver 'ker' Schneider
2b816b0d6a
[breaking-change] don't glob export ast::PathListItem_ variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
8b3856b1bc
[breaking-change] don't glob export ast::StrStyle variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
d844bfb196
[breaking-change] don't glob export ast::Visibility variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
dfe35da6b8
[breaking-change] don't glob export ast::TraitItemKind variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
73fa9b2da2
[breaking-change] don't glob export ast::Mutablity variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
14e09ad468
[breaking-change] don't glob export ast::MetaItem_
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
e797e1961d
[breaking-change] don't glob export ast::MacStmtStyle
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
798974cae5
[breaking-change] don't glob export ast::KleeneOp variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
019614f03d
[breaking-change] don't glob export ast::Item_ variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
0d6ddd1903
[breaking-change] don't glob export ast::ForeignItem_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
8290c950a8
[breaking-change] don't pub export ast::Stmt_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
498a2e416e
[breaking-change] don't pub export ast::IntLitType variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
69072c4f5d
[breaking-change] don't pub export ast::Lit_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
05d4cefd63
[breaking-change] don't pub export ast::Ty_ variants
2016-02-11 12:34:48 +01:00