summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2016-04-07Don't loop forever on error recovery with EOFNick Cameron-1/+10
closes #31804
2016-04-07Put in `-Z continue-parse-after-error`Felix S. Klock II-0/+9
This works by adding a boolean flag, `continue_after_error`, to `syntax::errors::Handler` that can be imperatively set to `true` or `false` via a new `fn set_continue_after_error`. The flag starts off true (since we generally try to recover from compiler errors, and `Handler` is shared across all phases). Then, during the `phase_1_parse_input`, we consult the setting of the `-Z continue-parse-after-error` debug flag to determine whether we should leave the flag set to `true` or should change it to `false`. ---- (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.)
2016-04-07syntax: Stop the bump loop for trait items at } and EOF.Eduard Burtescu-9/+17
backport of 221d0fbad0b201ef9264d3c9a30cd8c143ed51b2 to beta with hand-resolution of conflicts and reverting to `try!` syntax.
2016-04-07syntax: Prevent bumping the parser EOF to stop infinite loops.Eduard Burtescu-0/+11
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-12/+3
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-25Rollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakisManish Goregaokar-7/+0
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-24Fix the visibility of extern crate declarations and stop warning on pub ↵Jeffrey Seyfried-7/+0
extern crate
2016-02-22Use associated functions for libsyntax SepSeq constructors.Corey Farwell-34/+36
2016-02-21rustbuild: Sync some Cargo.toml/lib.rs dependenciesAlex Crichton-2/+1
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-18Remove unnecessary explicit lifetime bounds.Corey Farwell-11/+11
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2016-02-17Auto merge of #31707 - GuillaumeGomez:macro_name, r=sfacklerbors-1/+6
I'm wondering if instead of a second help message, a note would be better. I let it up to reviewers.
2016-02-17Auto merge of #31685 - petrochenkov:patrefact2, r=eddybbors-1/+1
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-16Add check on find_best_match_for_name and improve help message for undefined ↵ggomez-1/+6
macro
2016-02-16Auto merge of #31534 - jseyfried:restrict_noninline_mod, r=nikomatsakisbors-7/+17
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-16Split PatKind::Enum into PatKind::TupleStruct and PatKind::PathVadim Petrochenkov-1/+1
2016-02-15RebasingNick Cameron-2/+2
2016-02-15Some error recovery in the parserNick Cameron-32/+150
2016-02-15Add some simple error recovery to the parser and fix testsNick Cameron-28/+63
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-15error correction for missing or mismatched closing bracketsNick Cameron-28/+40
2016-02-15refactoring: inline some function in the parserNick Cameron-31/+28
2016-02-14Auto merge of #31581 - petrochenkov:patrefact, r=Manishearthbors-133/+148
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-14Rollup merge of #31609 - erickt:nit, r=sfacklerManish Goregaokar-1/+1
2016-02-13Split ast::PatKind::Enum into tuple struct and path patternsVadim Petrochenkov-24/+41
2016-02-13Rename ast::Pat_ and its variantsVadim Petrochenkov-120/+118
2016-02-13Disallow non-inline modules without path annotations inside blocks and fix ↵Jeffrey Seyfried-4/+17
fallout
2016-02-13Only consider a module to be a directory owner if it is located within a ↵Jeffrey Seyfried-3/+0
directory owner
2016-02-12syntax: Replace unstable `vec.as_slice().get()` with `vec.get()`Erick Tryzelaar-1/+1
2016-02-12Use more autoderef in libsyntaxJonas Schievink-171/+171
2016-02-12Auto merge of #31583 - petrochenkov:indi_ast, r=Manishearthbors-232/+249
cc #31487 plugin-[breaking-change] The AST part of https://github.com/rust-lang/rust/pull/30087 r? @Manishearth
2016-02-12Auto merge of #30830 - arcnmx:static-extern, r=alexcrichtonbors-0/+5
See #29676 r? @alexcrichton
2016-02-11Remove some unnecessary indirection from AST structuresVadim Petrochenkov-232/+249
2016-02-11bootstrap: Add a bunch of Cargo.toml filesAlex Crichton-0/+16
These describe the structure of all our crate dependencies.
2016-02-11Pass through diagnostic handler insteadarcnmx-5/+5
2016-02-11Use find_export_name_attr instead of string literalarcnmx-4/+4
2016-02-11Remove link_section and linkage as extern indicatorsarcnmx-2/+0
2016-02-11Only retain external static symbols across LTOarcnmx-0/+7
2016-02-11[breaking-change] don't glob export ast::PathListItem_ variantsOliver 'ker' Schneider-19/+23
2016-02-11[breaking-change] don't glob export ast::StrStyle variantsOliver 'ker' Schneider-19/+20
2016-02-11[breaking-change] don't glob export ast::Visibility variantsOliver 'ker' Schneider-42/+41
2016-02-11[breaking-change] don't glob export ast::TraitItemKind variantsOliver 'ker' Schneider-32/+30
2016-02-11[breaking-change] don't glob export ast::Mutablity variantsOliver 'ker' Schneider-42/+51
2016-02-11[breaking-change] don't glob export ast::MetaItem_Oliver 'ker' Schneider-54/+53
2016-02-11[breaking-change] don't glob export ast::MacStmtStyleOliver 'ker' Schneider-14/+13
2016-02-11[breaking-change] don't glob export ast::KleeneOp variantsOliver 'ker' Schneider-17/+18
2016-02-11[breaking-change] don't glob export ast::Item_ variantsOliver 'ker' Schneider-175/+171
2016-02-11[breaking-change] don't glob export ast::ForeignItem_ variantsOliver 'ker' Schneider-19/+18
2016-02-11[breaking-change] don't pub export ast::Stmt_ variantsOliver Schneider-81/+76
2016-02-11[breaking-change] don't pub export ast::IntLitType variantsOliver Schneider-25/+24
2016-02-11[breaking-change] don't pub export ast::Lit_ variantsOliver Schneider-67/+66
2016-02-11[breaking-change] don't pub export ast::Ty_ variantsOliver Schneider-109/+106