about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics
AgeCommit message (Collapse)AuthorLines
2015-01-21Make diagnostic ordering deterministicAlex Crichton-7/+7
2015-01-20Add some extended errors.Michael Sproul-0/+6
2015-01-20Make fatal errors work with codes, add to typeckBrian Anderson-0/+8
2015-01-20Make error code registration work again. #19624Brian Anderson-0/+7
2015-01-07use slicing sugarJorge Aparicio-6/+6
2015-01-07Replace full slice notation with index callsNick Cameron-3/+3
2015-01-05Stop using macro_escape as an inner attributeKeegan McAllister-2/+0
In preparation for the rename.
2015-01-02More falloutNick Cameron-1/+1
2014-12-21Fallout of std::str stabilizationAlex Crichton-3/+3
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-21/+26
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-4/+8
2014-12-04Modify libsyntax/diagnostics to not be so persnickety. The schemeNiko Matsakis-26/+11
doesn't work in a multi-crate context. We'll need to come up with something better.
2014-11-23std: Add a new top-level thread_local moduleAlex Crichton-20/+12
This commit removes the `std::local_data` module in favor of a new `std::thread_local` module providing thread local storage. The module provides two variants of TLS: one which owns its contents and one which is based on scoped references. Each implementation has pros and cons listed in the documentation. Both flavors have accessors through a function called `with` which yield a reference to a closure provided. Both flavors also panic if a reference cannot be yielded and provide a function to test whether an access would panic or not. This is an implementation of [RFC 461][rfc] and full details can be found in that RFC. This is a breaking change due to the removal of the `std::local_data` module. All users can migrate to the new thread local system like so: thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None))) The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as an implementation detail which must now be explicitly stated by users. [rfc]: https://github.com/rust-lang/rfcs/pull/461 [breaking-change]
2014-11-20Parse and store suffixes on literals.Huon Wilson-1/+1
This adds an optional suffix at the end of a literal token: `"foo"bar`. An actual use of a suffix in a expression (or other literal that the compiler reads) is rejected in the parser. This doesn't switch the handling of numbers to this system, and doesn't outlaw illegal suffixes for them yet.
2014-11-19Switch to an independent enum for `Lit*` subtokens.Huon Wilson-1/+1
2014-11-17Fallout from deprecationAaron Turon-1/+1
This commit handles the fallout from deprecating `_with` and `_equiv` methods.
2014-11-06Fallout from collection conventionsAlexis Beingessner-2/+2
2014-10-31DSTify HashJorge Aparicio-1/+1
- The signature of the `*_equiv` methods of `HashMap` and similar structures have changed, and now require one less level of indirection. Change your code from: ``` hashmap.find_equiv(&"Hello"); hashmap.find_equiv(&&[0u8, 1, 2]); ``` to: ``` hashmap.find_equiv("Hello"); hashmap.find_equiv(&[0u8, 1, 2]); ``` - The generic parameter `T` of the `Hasher::hash<T>` method have become `Sized?`. Downstream code must add `Sized?` to that method in their implementations. For example: ``` impl Hasher<FnvState> for FnvHasher { fn hash<T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ } } ``` must be changed to: ``` impl Hasher<FnvState> for FnvHasher { fn hash<Sized? T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ } // ^^^^^^ } ``` [breaking-change]
2014-10-30rollup merge of #18409 : gamazeps/issue15273Alex Crichton-0/+7
2014-10-29Diagnostic: resolve bare fn in expected closuregamazeps-0/+7
Closes #15273 (I did not find how to get the identifier in the message :/) Also creates the span_help! macro associated with #18126
2014-10-28Use PascalCase for token variantsBrendan Zabarauskas-6/+6
2014-10-26Use standard capitalisation for TokenTree variantsBrendan Zabarauskas-6/+6
2014-10-26Rename TokenTree variants for clarityBrendan Zabarauskas-6/+6
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
2014-09-19Allow syntax extensions to return multiple items, closes #16723.Florian Hahn-4/+4
This patch replaces `MacItem` with `MacItems`.
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-2/+2
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-6/+12
2014-07-19Register new snapshotsAlex Crichton-26/+0
2014-07-18Assign more diagnostic codesJakub Wieczorek-6/+6
2014-07-12Convert a first batch of diagnostics to have error codesJakub Wieczorek-1/+24
2014-07-11Add scaffolding for assigning alpha-numeric codes to rustc diagnosticsJakub Wieczorek-0/+208