| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
I think I didn't run tests properly - my second call to
select_all_obligations_or_error has made 3 tests fail. However, this is
just an error message change - integer fallback never worked with casts.
|
|
|
|
|
|
This should hopefully fix all cast-related ICEs once and for all.
I managed to make diagnostics hate me and give me spurious "decoder error"
- removing $build/tmp/extended-errors seems to fix it.
|
|
Closes #25394
|
|
Debug overflow checks for arithmetic negation landed in #24500, at which time
the `abs` method on signed integers was changed to using `wrapping_neg` to
ensure that the function never panicked. This implied that `abs` of `INT_MIN`
would return `INT_MIN`, another negative value. When this change was back-ported
to beta, however, in #24708, the `wrapping_neg` function had not yet been
backported, so the implementation was changed in #24785 to `!self + 1`. This
change had the unintended side effect of enabling debug overflow checks for the
`abs` function. Consequently, the current state of affairs is that the beta
branch checks for overflow in debug mode for `abs` and the nightly branch does
not.
This commit alters the behavior of nightly to have `abs` always check for
overflow in debug mode. This change is more consistent with the way the standard
library treats overflow as well, and it is also not a breaking change as it's
what the beta branch currently does (albeit if by accident).
cc #25378
|
|
Debug overflow checks for arithmetic negation landed in #24500, at which time
the `abs` method on signed integers was changed to using `wrapping_neg` to
ensure that the function never panicked. This implied that `abs` of `INT_MIN`
would return `INT_MIN`, another negative value. When this change was back-ported
to beta, however, in #24708, the `wrapping_neg` function had not yet been
backported, so the implementation was changed in #24785 to `!self + 1`. This
change had the unintended side effect of enabling debug overflow checks for the
`abs` function. Consequently, the current state of affairs is that the beta
branch checks for overflow in debug mode for `abs` and the nightly branch does
not.
This commit alters the behavior of nightly to have `abs` always check for
overflow in debug mode. This change is more consistent with the way the standard
library treats overflow as well, and it is also not a breaking change as it's
what the beta branch currently does (albeit if by accident).
cc #25378
|
|
cc #24407
|
|
Fixes #23968.
Since the values are stored in a u64 internally, we need to be mask away the
high bits after applying the ! operator. Otherwise, these bits will be set to
one, causing overflow.
|
|
Closes #25394
|
|
|
|
|
|
|
|
Since the values are stored in a u64 internally, we need to be mask away the
high bits after applying the ! operator. Otherwise, these bits will be set to
one, causing overflow.
|
|
|
|
Closes #18173
|
|
This allows compiling entire crates from memory or preprocessing source files before they are tokenized.
Minor API refactoring included, which is a [breaking-change] for libsyntax users:
* `ParseSess::{next_node_id, reserve_node_ids}` moved to rustc's `Session`
* `new_parse_sess` -> `ParseSess::new`
* `new_parse_sess_special_handler` -> `ParseSess::with_span_handler`
* `mk_span_handler` -> `SpanHandler::new`
* `default_handler` -> `Handler::new`
* `mk_handler` -> `Handler::with_emitter`
* `string_to_filemap(sess source, path)` -> `sess.codemap().new_filemap(path, source)`
|
|
|
|
|
|
fix #24968
report more friendly error message for Self when fn args
copy from https://github.com/rust-lang/rust/pull/25096
r? @nrc @arielb1
|
|
|
|
Permit token trees, identifiers, and blocks to be following by sequences.
Fixes #25436.
r? @pnkfelix
|
|
|
|
Closes #25468.
|
|
Closes #25468.
|
|
|
|
|
|
Closes #18173
|
|
Closes #24986.
|
|
sequences.
Fixes #25436.
|
|
|
|
Also start factoring out an API for compiler tools to use and fix a bug that was preventing DXR indexing Rust properly.
r? @huonw
|
|
Stripping unconfigured items prior to collecting crate metadata means we
can say things like `#![cfg_attr(foo, crate_type="lib")]`.
Fixes #25347.
|
|
- Successful merges: #25354, #25381, #25391, #25395, #25397, #25398, #25401
- Failed merges:
|
|
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the
currently-unstable `Duration` type. The API of the type has been scaled back to
be more conservative and it also no longer supports negative durations.
[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md
The inner `duration` module of the `time` module has now been hidden (as
`Duration` is reexported) and the feature name for this type has changed from
`std_misc` to `duration`. All APIs accepting durations have also been audited to
take a more flavorful feature name instead of `std_misc`.
Closes #24874
|
|
Stripping unconfigured items prior to collecting crate metadata means we
can say things like `#![cfg_attr(foo, crate_type="lib")]`.
Fixes #25347.
|
|
Adds explanations for E0053, E0066, E0069, E0251, E0252, E0255, E0256, E0368.
cc #24407
|
|
|
|
|
|
We don't have any pending snapshot-requiring changes. Closes #20184.
Works toward #3965.
|
|
This also updates the error messages for both. For E0066, it removes mention
of "managed heap", which was removed in 8a91d33. For E0069, I just tweaked
the wording to make it a bit more explicit.
|
|
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the
currently-unstable `Duration` type. The API of the type has been scaled back to
be more conservative and it also no longer supports negative durations.
[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md
The inner `duration` module of the `time` module has now been hidden (as
`Duration` is reexported) and the feature name for this type has changed from
`std_misc` to `duration`. All APIs accepting durations have also been audited to
take a more flavorful feature name instead of `std_misc`.
Closes #24874
|
|
Also change several error messages to refer to "items" rather than
"methods", since associated items that require resolution during type
checking are not always methods.
|
|
We don't have any pending snapshot-requiring changes. Tests which
continue to be ignored are those that are broken by codegen changes.
|
|
|
|
|
|
|
|
There is no subtyping relationship between the types (or their non-freshened
variants), so they can not be merged.
Fixes #22645
Fixes #24352
Fixes #23825
Should fix #25235 (no test in issue).
Should fix #19976 (test is outdated).
|