| Age | Commit message (Collapse) | Author | Lines |
|
Lots of downstream changes in librustc, should be infinitesimally faster.
|
|
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two
representative tests.
Fixes #7971
Fixes #6304
Fixes #8367
Fixes #8754
Fixes #8852
Fixes #2543
Fixes #7654
|
|
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.
Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
|
|
`for` desugars to `loop` so it is trivial to just desugar to `loop` while
retaining any label.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this makes comparisons constant-time, and enables spelling-comparison
of identifiers, crucial in many parts of resolve.
|
|
|
|
|
|
this is necessary so that the new idents are connected to the original strings.
this is important both for error messages, and so that top-level refs get connected
to the right things.
|
|
|
|
also adds test cases
|
|
|
|
|
|
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.
Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
|
|
Closes #7609
|
|
|
|
|
|
|
|
|
|
avoids conflict with fields actually named `__field__`
|
|
|
|
|
|
|
|
r? anybody
|
|
|
|
This removes the stacking of type parameters that occurs when invoking
trait methods, and fixes all places in the standard library that were
relying on it. It is somewhat awkward in places; I think we'll probably
want something like the `Foo::<for T>::new()` syntax.
|
|
For example, `foo::<T>::bar::<U>`.
This doesn't enforce that the type parameters are in the right
positions, however.
|
|
They are still present as part of the borrow check.
|
|
|
|
|
|
Fixes #8615.
|
|
* Get rid of by-value-self workarounds; it works now
* Remove type annotations, they're not needed anymore
|
|
fix for #8088, along with a test.
|
|
Fixes #8615.
|
|
Rename task::yield() to task::deschedule().
Fixes #8494.
|
|
The span was fixed at some point to point to the correct character, but
the error message is still bad. Update it to emit the actual character
in question (potentially escaped).
Fixes #3747.
|
|
When parsing a trait function, the function must end with either `;` or
`{` (signifying a default implementation). The error message incorrectly
stated that it must be `;` or `}`.
Fixes #6610.
|
|
remove code for parsing ancient syntax
added a run-pass test
|
|
|
|
Rename task::yield() to task::deschedule().
Fixes #8494.
|
|
The span was fixed at some point to point to the correct character, but
the error message is still bad. Update it to emit the actual character
in question (potentially escaped).
Fixes #3747.
|
|
When parsing a trait function, the function must end with either `;` or
`{` (signifying a default implementation). The error message incorrectly
stated that it must be `;` or `}`.
Fixes #6610.
|
|
|
|
Closes #5495
|
|
pnkfelix/rust/fsk-issue3192-improve-parse-error-for-empty-struct-init, r=pcwalton,me
Fix #3192. r? anyone
There are 4 different new tests, to check some different scenarios for
what the parse context is at the time of recovery, becasue our
compile-fail infrastructure does not appear to handle verifying
error-recovery situations.
Differentiate between unit-like struct definition item and unit-like
struct construction in the error message.
----
More generally, outlines a more generic strategy for parse error
recovery: By committing to an expression/statement at set points in
the parser, we can then do some look-ahead to catch common mistakes
and skip over them.
One detail about this strategy is that you want to avoid emitting the
"helpful" message unless the input is reasonably close to the case of
interest. (E.g. do not warn about a potential unit struct for an
input of the form `let hmm = do foo { } { };`)
To accomplish this, I added (partial) last_token tracking; used for
`commit_stmt` support.
The check_for_erroneous_unit_struct_expecting fn returns bool to
signal whether it "made progress"; currently unused; this is meant for
use to compose several such recovery checks together in a loop.
|