summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2016-05-26Address review commentsVadim Petrochenkov-2/+6
2016-05-26Implement `..` in tuple (struct) patternsVadim Petrochenkov-76/+93
2016-05-26Fix ICE on failure to parse token treeJeffrey Seyfried-2/+5
2016-05-25parser.rs: fix typos in commentsCarlo Teubner-5/+5
2016-05-25Add a new AST-only type variant `ImplicitSelf`Vadim Petrochenkov-26/+22
2016-05-25Remove ExplicitSelf from ASTVadim Petrochenkov-217/+124
2016-05-25Auto merge of #33713 - LeoTestard:macro-rules-invalid-lhs, r=pnkfelixbors-45/+59
Make sure that macros that didn't pass LHS checking are not expanded. This avoid duplicate errors for things like invalid fragment specifiers, or parsing errors for ambiguous macros.
2016-05-24Apply visit_path to import prefixes by defaultVadim Petrochenkov-11/+4
2016-05-24Back to single line between errors. Add header space to secondary filesJonathan Turner-1/+26
2016-05-24syntax: Make codemap::get_filemap() return an OptionKamal Marhubi-3/+3
This is more idiomatic, putting the caller in charge of whether or not to panic.
2016-05-24syntax/hir: give loop labels a spanGeorg Brandl-41/+51
This makes the "shadowing labels" warning *not* print the entire loop as a span, but only the lifetime. Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
2016-05-24Add comments and fix a nitJeffrey Seyfried-1/+9
2016-05-24Avoid iterating two times over the list of LHSes.Leo Testard-5/+4
2016-05-24Make sure that macros that didn't pass LHS checking are not expanded.Leo Testard-41/+56
This avoids duplicate errors for things like invalid fragment specifiers, or parsing errors for ambiguous macros. Fixes #29231.
2016-05-24Remove unused field and argumentSeo Sanghyeon-6/+2
2016-05-23Update error format for readability. Add spacing header<->snippet and ↵Jonathan Turner-1/+8
another line between errors
2016-05-24Do not inject test harness for --cfg testSeo Sanghyeon-5/+1
2016-05-21Move `placement_in_syntax` gated feature checking from expansion to the ↵Jeffrey Seyfried-16/+3
post-expansion visitor
2016-05-21Refactor away `check_attributes`Jeffrey Seyfried-11/+7
2016-05-21Refactor away `expand_item_mac`Jeffrey Seyfried-159/+85
2016-05-21Refactor out `mac_result` in `expand_mac_invoc`Jeffrey Seyfried-54/+53
2016-05-21Check attributes in `expand_mac_invoc`Jeffrey Seyfried-22/+12
2016-05-21Use `expand_mac_invoc` in `expand_pat`Jeffrey Seyfried-75/+3
2016-05-21Re-fold expanded items in `expand_mac_invoc`Jeffrey Seyfried-63/+13
2016-05-21Improve diagnosticsJeffrey Seyfried-5/+3
2016-05-21Introduce `MacroGenerable` traitJeffrey Seyfried-53/+46
2016-05-19Rollup merge of #33730 - jseyfried:fix_macro_backtrace_diagnostics, ↵Manish Goregaokar-1/+1
r=nikomatsakis Fix macro expansion backtrace diagnostics Fixes #33704. r? @nikomatsakis
2016-05-19Rollup merge of #33712 - jseyfried:fix_expanded_expr_span_bug, r=nrcManish Goregaokar-7/+1
Fix bug in macro expression spans Fix a bug in macro expression spans. r? @nrc
2016-05-18Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakisbors-10/+54
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
2016-05-19Fix macro expansion backtrace diagnosticsJeffrey Seyfried-1/+1
2016-05-18Fix bug in macro expression spansJeffrey Seyfried-7/+1
2016-05-18Auto merge of #33654 - petrochenkov:hirident, r=nrcbors-0/+4
Remove hir::Ident Now when name resolution is done on AST, `hir::Ident` is no longer necessary. See https://github.com/rust-lang/rust/pull/30145 for more details. r? @nrc
2016-05-17fix -Z treat-err-as-bugNiko Matsakis-30/+30
2016-05-17Fix for #33559Jonathan Turner-1/+2
2016-05-17Improve a few errors and fix #33366Jonathan Turner-2/+2
2016-05-17De-emph minimized spans, add better debugging outputJonathan Turner-10/+27
2016-05-17Print secondary labels as notes in old skool modeJonathan Turner-0/+26
2016-05-16Remove hir::IdentVadim Petrochenkov-0/+4
2016-05-15Auto merge of #33505 - petrochenkov:self, r=nrcbors-198/+182
Remove ExplicitSelf from HIR `self` argument is already kept in the argument list and can be retrieved from there if necessary, so there's no need for the duplication. The same changes can be applied to AST, I'll make them in the next breaking batch. The first commit also improves parsing of method declarations and fixes https://github.com/rust-lang/rust/issues/33413. r? @eddyb
2016-05-15Auto merge of #33619 - jonathandturner:improve_structured_errors, r=nikomatsakisbors-4/+5
Batch of improvements to errors for new error format This is a batch of improvements to existing errors to help get the most out of the new error format. * Added labels to primary spans (^^^) for a set of errors that didn't currently have them * Highlight the source blue under the secondary notes for better readability * Move some of the "Note:" into secondary spans+labels * Fix span_label to take &mut instead, which makes it work the same as other methods in that set
2016-05-14Auto merge of #33568 - nrc:save-json-2, r=pnkfelixbors-4/+1
save-analysis: JSON mk2 cc @aochagavia r? @pnkfelix
2016-05-14syntax: Refactor parsing of method declarationsVadim Petrochenkov-198/+182
Fix spans and expected token lists, fix #33413 + other cosmetic improvements Add test for #33413 Convert between `Arg` and `ExplicitSelf` precisely Simplify pretty-printing for methods
2016-05-13Auto merge of #33513 - sanxiyn:tab-in-error, r=nikomatsakisbors-2/+32
Better handling of tab in error cc #33240.
2016-05-12Update errors to use new error formatJonathan Turner-4/+4
2016-05-12Set of fixes to improve borrowcks that weren't updatedJonathan Turner-0/+1
2016-05-12Better handling of tab in errorSeo Sanghyeon-2/+32
2016-05-11save-analysis: give better text info in value fieldsNick Cameron-4/+1
2016-05-09Auto merge of #33443 - jseyfried:resolve_ast, r=nrcbors-0/+38
Perform name resolution before and during ast->hir lowering This PR performs name resolution before and during ast->hir lowering instead of in phase 3. r? @nrc
2016-05-09Auto merge of #32900 - alexcrichton:panic2abort, r=nikomatsakisbors-1/+12
rustc: Implement custom panic runtimes This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account). Closes #32837
2016-05-09Auto merge of #33048 - Amanieu:integer_atomics, r=alexcrichtonbors-2/+6
Add integer atomic types Tracking issue: #32976 RFC: rust-lang/rfcs#1543 The changes to AtomicBool in the RFC are not included, they are in a separate PR (#32365).