Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #127529

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
90cbd0b
impl FusedIterator and a size hint for the error sources iter
Sky9x Jun 28, 2024
321eba5
Update f16/f128 FIXMEs that needed (NEG_)INFINITY
tgross35 Jul 8, 2024
ec662e7
`#[doc(alias)]`'s doc: say that ASCII spaces are allowed
ShE3py Jul 8, 2024
96a7916
Update a f16/f128 FIXME to be more accurate
tgross35 Jul 8, 2024
7097dbc
exhaustively destructure external constraints
lcnr Jul 9, 2024
e38109d
use `update_parent_goal` for lazy updates
lcnr Jul 9, 2024
fd9a925
Automatically taint when reporting errors from ItemCtxt
oli-obk Jul 5, 2024
aece064
Remove HirTyLowerer::set_tainted_by_errors, since it is now redundant
oli-obk Jul 5, 2024
dd175fe
cycle_participants to nested_goals
lcnr Jul 9, 2024
7af825f
Split out overflow handling into its own module
compiler-errors Jul 8, 2024
cd68a28
Move some stuff into the ambiguity and suggestion modules
compiler-errors Jul 8, 2024
bbbff80
Split out fulfillment error reporting a bit more
compiler-errors Jul 8, 2024
4325467
Use verbose style when suggesting changing `const` with `let`
estebank Jul 5, 2024
a57dfdb
Account for `let foo = expr`; to suggest `const foo: Ty = expr;`
estebank Jul 8, 2024
6405df5
Fix aarch64 test
estebank Jul 9, 2024
ea392e1
Rollup merge of #127091 - Sky9x:fused-error-sources-iter, r=dtolnay
matthiaskrgr Jul 9, 2024
312a76b
Rollup merge of #127358 - oli-obk:taint_itemctxt, r=fmease
matthiaskrgr Jul 9, 2024
26569e8
Rollup merge of #127382 - estebank:const-let, r=compiler-errors
matthiaskrgr Jul 9, 2024
1df9bfe
Rollup merge of #127484 - ShE3py:rustdoc-doc-alias-whitespace-doc, r=…
matthiaskrgr Jul 9, 2024
5f64cfc
Rollup merge of #127495 - compiler-errors:more-trait-error-reworking,…
matthiaskrgr Jul 9, 2024
cdb013b
Rollup merge of #127496 - tgross35:f16-f128-pattern-fixme, r=Nadrieril
matthiaskrgr Jul 9, 2024
0cda246
Rollup merge of #127508 - lcnr:search-graph-prep, r=compiler-errors
matthiaskrgr Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/rustc_lint/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ fn lint_literal<'tcx>(
ty::Float(t) => {
let is_infinite = match lit.node {
ast::LitKind::Float(v, _) => match t {
// FIXME(f16_f128): add this check once we have library support
// FIXME(f16_f128): add this check once `is_infinite` is reliable (ABI
// issues resolved).
ty::FloatTy::F16 => Ok(false),
ty::FloatTy::F32 => v.as_str().parse().map(f32::is_infinite),
ty::FloatTy::F64 => v.as_str().parse().map(f64::is_infinite),
Expand Down
42 changes: 18 additions & 24 deletions tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ fn range_to_inclusive() {
// FIXME(f16_f128): remove gate when ABI issues are resolved
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
{
// FIXME(f16_f128): enable infinity tests when constants are available
// assert!(yes!(f16::NEG_INFINITY, ..=f16::NEG_INFINITY));
// assert!(yes!(f16::NEG_INFINITY, ..=1.0f16));
assert!(yes!(f16::NEG_INFINITY, ..=f16::NEG_INFINITY));
assert!(yes!(f16::NEG_INFINITY, ..=1.0f16));
assert!(yes!(1.5f16, ..=1.5f16));
assert!(!yes!(1.6f16, ..=-1.5f16));
}
Expand All @@ -68,9 +67,8 @@ fn range_to_inclusive() {
// FIXME(f16_f128): remove gate when ABI issues are resolved
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
{
// FIXME(f16_f128): enable infinity tests when constants are available
// assert!(yes!(f128::NEG_INFINITY, ..=f128::NEG_INFINITY));
// assert!(yes!(f128::NEG_INFINITY, ..=1.0f128));
assert!(yes!(f128::NEG_INFINITY, ..=f128::NEG_INFINITY));
assert!(yes!(f128::NEG_INFINITY, ..=1.0f128));
assert!(yes!(1.5f128, ..=1.5f128));
assert!(!yes!(1.6f128, ..=-1.5f128));
}
Expand Down Expand Up @@ -111,8 +109,7 @@ fn range_to() {
// FIXME(f16_f128): remove gate when ABI issues are resolved
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
{
// FIXME(f16_f128): enable infinity tests when constants are available
// assert!(yes!(f16::NEG_INFINITY, ..1.0f16));
assert!(yes!(f16::NEG_INFINITY, ..1.0f16));
assert!(!yes!(1.5f16, ..1.5f16));
const E16: f16 = 1.5f16 + f16::EPSILON;
assert!(yes!(1.5f16, ..E16));
Expand All @@ -137,8 +134,7 @@ fn range_to() {
// FIXME(f16_f128): remove gate when ABI issues are resolved
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
{
// FIXME(f16_f128): enable infinity tests when constants are available
// assert!(yes!(f128::NEG_INFINITY, ..1.0f128));
assert!(yes!(f128::NEG_INFINITY, ..1.0f128));
assert!(!yes!(1.5f128, ..1.5f128));
const E128: f128 = 1.5f128 + f128::EPSILON;
assert!(yes!(1.5f128, ..E128));
Expand Down Expand Up @@ -181,15 +177,14 @@ fn range_from() {
// FIXME(f16_f128): remove gate when ABI issues are resolved
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
{
// FIXME(f16_f128): enable infinity tests when constants are available
// assert!(yes!(f16::NEG_INFINITY, f16::NEG_INFINITY..));
// assert!(yes!(f16::INFINITY, f16::NEG_INFINITY..));
// assert!(!yes!(f16::NEG_INFINITY, 1.0f16..));
// assert!(yes!(f16::INFINITY, 1.0f16..));
assert!(yes!(f16::NEG_INFINITY, f16::NEG_INFINITY..));
assert!(yes!(f16::INFINITY, f16::NEG_INFINITY..));
assert!(!yes!(f16::NEG_INFINITY, 1.0f16..));
assert!(yes!(f16::INFINITY, 1.0f16..));
assert!(!yes!(1.0f16 - f16::EPSILON, 1.0f16..));
assert!(yes!(1.0f16, 1.0f16..));
// assert!(yes!(f16::INFINITY, 1.0f16..));
// assert!(yes!(f16::INFINITY, f16::INFINITY..));
assert!(yes!(f16::INFINITY, 1.0f16..));
assert!(yes!(f16::INFINITY, f16::INFINITY..));
}

// f32; `X..`
Expand All @@ -216,15 +211,14 @@ fn range_from() {
// FIXME(f16_f128): remove gate when ABI issues are resolved
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
{
// FIXME(f16_f128): enable infinity tests when constants are available
// assert!(yes!(f128::NEG_INFINITY, f128::NEG_INFINITY..));
// assert!(yes!(f128::INFINITY, f128::NEG_INFINITY..));
// assert!(!yes!(f128::NEG_INFINITY, 1.0f128..));
// assert!(yes!(f128::INFINITY, 1.0f128..));
assert!(yes!(f128::NEG_INFINITY, f128::NEG_INFINITY..));
assert!(yes!(f128::INFINITY, f128::NEG_INFINITY..));
assert!(!yes!(f128::NEG_INFINITY, 1.0f128..));
assert!(yes!(f128::INFINITY, 1.0f128..));
assert!(!yes!(1.0f128 - f128::EPSILON, 1.0f128..));
assert!(yes!(1.0f128, 1.0f128..));
// assert!(yes!(f128::INFINITY, 1.0f128..));
// assert!(yes!(f128::INFINITY, f128::INFINITY..));
assert!(yes!(f128::INFINITY, 1.0f128..));
assert!(yes!(f128::INFINITY, f128::INFINITY..));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![feature(f128)]
#![feature(f16)]

macro_rules! m {
($s:expr, $($t:tt)+) => {
match $s { $($t)+ => {} }
Expand Down Expand Up @@ -27,11 +30,14 @@ fn main() {
m!(0, ..i128::MIN);
//~^ ERROR lower range bound must be less than upper

// FIXME(f16_f128): add tests when NEG_INFINITY is available
m!(0f16, ..f16::NEG_INFINITY);
//~^ ERROR lower range bound must be less than upper
m!(0f32, ..f32::NEG_INFINITY);
//~^ ERROR lower range bound must be less than upper
m!(0f64, ..f64::NEG_INFINITY);
//~^ ERROR lower range bound must be less than upper
m!(0f128, ..f128::NEG_INFINITY);
//~^ ERROR lower range bound must be less than upper

m!('a', ..'\u{0}');
//~^ ERROR lower range bound must be less than upper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,81 +1,93 @@
error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:8:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:11:11
|
LL | m!(0, ..u8::MIN);
| ^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:10:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:13:11
|
LL | m!(0, ..u16::MIN);
| ^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:12:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:15:11
|
LL | m!(0, ..u32::MIN);
| ^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:14:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:17:11
|
LL | m!(0, ..u64::MIN);
| ^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:16:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:19:11
|
LL | m!(0, ..u128::MIN);
| ^^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:19:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:22:11
|
LL | m!(0, ..i8::MIN);
| ^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:21:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:24:11
|
LL | m!(0, ..i16::MIN);
| ^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:23:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:26:11
|
LL | m!(0, ..i32::MIN);
| ^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:25:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:28:11
|
LL | m!(0, ..i64::MIN);
| ^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:27:11
--> $DIR/half-open-range-pats-thir-lower-empty.rs:30:11
|
LL | m!(0, ..i128::MIN);
| ^^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:31:14
--> $DIR/half-open-range-pats-thir-lower-empty.rs:33:14
|
LL | m!(0f16, ..f16::NEG_INFINITY);
| ^^^^^^^^^^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:35:14
|
LL | m!(0f32, ..f32::NEG_INFINITY);
| ^^^^^^^^^^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:33:14
--> $DIR/half-open-range-pats-thir-lower-empty.rs:37:14
|
LL | m!(0f64, ..f64::NEG_INFINITY);
| ^^^^^^^^^^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:36:13
--> $DIR/half-open-range-pats-thir-lower-empty.rs:39:15
|
LL | m!(0f128, ..f128::NEG_INFINITY);
| ^^^^^^^^^^^^^^^^^^^^

error[E0579]: lower range bound must be less than upper
--> $DIR/half-open-range-pats-thir-lower-empty.rs:42:13
|
LL | m!('a', ..'\u{0}');
| ^^^^^^^^^

error: aborting due to 13 previous errors
error: aborting due to 15 previous errors

For more information about this error, try `rustc --explain E0579`.