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 9 pull requests #125931

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c8390cd
Show files produced by --emit foo in json artifact notifications
pacak Apr 6, 2024
fc1e52a
Add tracking issue and unstable book page for `"vectorcall"` ABI
beetrees Apr 28, 2024
a126c11
Reorder the TOC so that targets are put under their meta-group
Lokathor May 28, 2024
f646314
make the fact that arm-none-eabi is a group of targets the first thin…
Lokathor May 28, 2024
144adf6
update armv4t docs
Lokathor May 28, 2024
d8704b9
It's spelled "ARM", in all caps.
Lokathor May 28, 2024
bb1f5c3
delete the offending single space.
Lokathor May 28, 2024
94d4040
The modern styling is apparently to use Title Case for the chip/compa…
Lokathor May 31, 2024
c3de4b3
Handle all GVN binops in a single place.
cjgillot Jun 2, 2024
b320ac7
Add a regression test for a former blanket impl synthesis ICE
fmease Jun 3, 2024
f152e2c
Revert "Cache whether a body has inline consts"
oli-obk Jun 3, 2024
c9e50ae
Revert "Create const block DefIds in typeck instead of ast lowering"
oli-obk Jun 3, 2024
0d88bf2
Add regression test
oli-obk Jun 3, 2024
4576027
Remove stray "this"
tbu- Jun 3, 2024
66a1386
Fix ICE caused by ignoring EffectVars in type inference
ajwock Jun 1, 2024
de6b219
Make WHERE_CLAUSES_OBJECT_SAFETY a regular object safety violation
compiler-errors Apr 23, 2024
511f1cf
check_is_object_safe -> is_object_safe
compiler-errors May 21, 2024
e8f7da0
Rollup merge of #122597 - pacak:master, r=bjorn3
matthiaskrgr Jun 3, 2024
e441d4d
Rollup merge of #124486 - beetrees:vectorcall-tracking-issue, r=ehuss
matthiaskrgr Jun 3, 2024
cff61d7
Rollup merge of #125380 - compiler-errors:wc-obj-safety, r=oli-obk
matthiaskrgr Jun 3, 2024
747af0f
Rollup merge of #125690 - Lokathor:arm-maintainer-reorg, r=ehuss
matthiaskrgr Jun 3, 2024
374460d
Rollup merge of #125865 - ajwock:ice_not_fully_resolved, r=fee1-dead
matthiaskrgr Jun 3, 2024
4483fc6
Rollup merge of #125893 - cjgillot:gvn-newops, r=oli-obk
matthiaskrgr Jun 3, 2024
64a62d4
Rollup merge of #125909 - fmease:rustdoc-add-test-synth-blanket-impls…
matthiaskrgr Jun 3, 2024
b5a9928
Rollup merge of #125918 - oli-obk:const_block_ice, r=compiler-errors
matthiaskrgr Jun 3, 2024
69d8f62
Rollup merge of #125919 - tbu-:pr_fix_typo, r=lqd
matthiaskrgr Jun 3, 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
2 changes: 2 additions & 0 deletions compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ pub enum FixupError {
UnresolvedFloatTy(FloatVid),
UnresolvedTy(TyVid),
UnresolvedConst(ConstVid),
UnresolvedEffect(EffectVid),
}

/// See the `region_obligations` field for more information.
Expand Down Expand Up @@ -614,6 +615,7 @@ impl fmt::Display for FixupError {
),
UnresolvedTy(_) => write!(f, "unconstrained type"),
UnresolvedConst(_) => write!(f, "unconstrained const value"),
UnresolvedEffect(_) => write!(f, "unconstrained effect value"),
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_infer/src/infer/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ impl<'a, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for FullTypeResolver<'a, 'tcx> {
ty::ConstKind::Infer(InferConst::Fresh(_)) => {
bug!("Unexpected const in full const resolver: {:?}", c);
}
ty::ConstKind::Infer(InferConst::EffectVar(evid)) => {
return Err(FixupError::UnresolvedEffect(evid));
}
_ => {}
}
c.try_super_fold_with(self)
Expand Down
11 changes: 0 additions & 11 deletions tests/crashes/119830.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//@ check-fail
// Fixes #119830

#![feature(effects)]
#![feature(min_specialization)]
#![feature(const_trait_impl)]

trait Specialize {}

trait Foo {}

impl<T> const Foo for T {}
//~^ error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
//~| error: the const parameter `host` is not constrained by the impl trait, self type, or predicates [E0207]

impl<T> const Foo for T where T: const Specialize {}
//~^ error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
//~| error: `const` can only be applied to `#[const_trait]` traits
//~| error: the const parameter `host` is not constrained by the impl trait, self type, or predicates [E0207]
//~| error: specialization impl does not specialize any associated items
//~| error: could not resolve generic parameters on overridden impl

fn main() {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
--> $DIR/spec-effectvar-ice.rs:12:15
|
LL | trait Foo {}
| - help: mark `Foo` as const: `#[const_trait]`
LL |
LL | impl<T> const Foo for T {}
| ^^^
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
--> $DIR/spec-effectvar-ice.rs:16:15
|
LL | trait Foo {}
| - help: mark `Foo` as const: `#[const_trait]`
...
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change

error: `const` can only be applied to `#[const_trait]` traits
--> $DIR/spec-effectvar-ice.rs:16:40
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^^^^^^

error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
--> $DIR/spec-effectvar-ice.rs:12:9
|
LL | impl<T> const Foo for T {}
| ^^^^^ unconstrained const parameter
|
= note: expressions using a const parameter must map each value to a distinct output value
= note: proving the result of expressions other than the parameter are unique is not supported

error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
--> $DIR/spec-effectvar-ice.rs:16:9
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^ unconstrained const parameter
|
= note: expressions using a const parameter must map each value to a distinct output value
= note: proving the result of expressions other than the parameter are unique is not supported

error: specialization impl does not specialize any associated items
--> $DIR/spec-effectvar-ice.rs:16:1
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: impl is a specialization of this impl
--> $DIR/spec-effectvar-ice.rs:12:1
|
LL | impl<T> const Foo for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^

error: could not resolve generic parameters on overridden impl
--> $DIR/spec-effectvar-ice.rs:16:1
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 7 previous errors

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