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 11 pull requests #77557

Merged
merged 44 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8894b36
Remove error message in specific case
JulianKnodt Aug 26, 2020
badf4af
core::global_allocator docs link to std::alloc::GlobalAlloc
mightyiam Sep 26, 2020
e05e2f9
bootstrap: add ./x.py run src/tools/build-manifest
pietroalbini Sep 30, 2020
d4928ad
build-manifest: keep legacy behavior when invoking through ./x.py dist
pietroalbini Sep 30, 2020
6e15975
build-manifest: split the manifest struct definition in a separate file
pietroalbini Sep 30, 2020
df76cf8
BTreeMap: admit the existence of leaf edges in comments
ssomers Aug 9, 2020
0375ee8
build-manifest: move generating a target to the manifest mod
pietroalbini Oct 1, 2020
acd8e59
build-manifest: calculate checksums lazily and in parallel
pietroalbini Oct 1, 2020
fde1135
build-manifest: avoid collecting SHAs in parallel on legacy mode
pietroalbini Oct 1, 2020
9352062
build-manifest: use BufReader
pietroalbini Oct 1, 2020
0801263
Fix missing diagnostic span for `impl Trait` with const generics
varkor Oct 2, 2020
1db05e0
Add various `min_const_generics` regression tests
varkor Oct 2, 2020
d71d13e
BTreeMap: refactoring around edges, missed spots
ssomers Sep 26, 2020
488b759
Replace "non trivial" with "non-trivial"
varkor Oct 2, 2020
96eb68b
Add `FIXME` for const generic defaults
varkor Oct 3, 2020
3631d29
Add tests for `const_generics`
varkor Oct 3, 2020
7029065
Move tests
varkor Oct 3, 2020
6647eee
Add `const_generics` test for `impl-trait-with-const-arguments`
varkor Oct 3, 2020
0e68e1b
Prevent #[doc(alias = "...")] at crate level
GuillaumeGomez Sep 4, 2020
5c836e3
Add test for #[doc(alias = "...")] at crate level
GuillaumeGomez Sep 4, 2020
0e18017
Ensure that the error isn't displayed more than once
GuillaumeGomez Sep 11, 2020
3950a6d
Run attributes check at crate level
GuillaumeGomez Sep 21, 2020
6ec2474
Strenghten tests for crate-level attributes check
GuillaumeGomez Sep 29, 2020
98a2292
Allow `Abort` terminators in a const-context
ecstatic-morse Oct 3, 2020
a5f0831
Add check-pass test for `#[unwind(aborts)]` on a `const fn`
ecstatic-morse Oct 3, 2020
14c3705
Ensure that the const-eval engine handles `#[unwind(aborts)]`
ecstatic-morse Oct 3, 2020
d74b8e0
Replace some once(x).chain(once(y)) with [x, y] IntoIter
scottmcm Oct 3, 2020
3641a37
Enforce crate level attributes checks
GuillaumeGomez Oct 3, 2020
4585c22
Include scope id in SocketAddrV6::Display
tamird Oct 1, 2020
25fdbaf
Discuss cleanup blocks and `span_bug` on `Abort`
ecstatic-morse Oct 4, 2020
fe97990
Add comment to `Abort` match arm
ecstatic-morse Oct 4, 2020
6ae1da3
But whatever
ecstatic-morse Oct 4, 2020
17d3c0a
Use more intra-doc-links in `core::fmt`
LeSeulArtichaut Aug 23, 2020
6c9e857
Rollup merge of #75853 - LeSeulArtichaut:core-intra-docs-3, r=jyn514
Dylan-DPC Oct 5, 2020
5fa978f
Rollup merge of #75928 - JulianKnodt:non_utf8, r=estebank
Dylan-DPC Oct 5, 2020
e6e7ccc
Rollup merge of #76329 - GuillaumeGomez:doc-alias-crate-level, r=matt…
Dylan-DPC Oct 5, 2020
583269d
Rollup merge of #77219 - mightyiam:issue_77100, r=jyn514
Dylan-DPC Oct 5, 2020
fe087ec
Rollup merge of #77395 - ssomers:btree_love_the_leaf_edge_comments, r…
Dylan-DPC Oct 5, 2020
fffeaa7
Rollup merge of #77407 - pietroalbini:less-build-manifest, r=Mark-Sim…
Dylan-DPC Oct 5, 2020
f1afed5
Rollup merge of #77426 - tamird:sockaddr-scope-id, r=dtolnay
Dylan-DPC Oct 5, 2020
e032bb7
Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,este…
Dylan-DPC Oct 5, 2020
23b1e3d
Rollup merge of #77471 - ssomers:btree_cleanup_3, r=Mark-Simulacrum
Dylan-DPC Oct 5, 2020
5fbb411
Rollup merge of #77512 - ecstatic-morse:const-checking-allow-abort, r…
Dylan-DPC Oct 5, 2020
9dbc9ed
Rollup merge of #77514 - scottmcm:less-once-chain-once, r=estebank
Dylan-DPC Oct 5, 2020
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
Prev Previous commit
Next Next commit
Allow Abort terminators in a const-context
These appear along the cleanup path inside functions with
`#[unwind(aborts)]`. We don't const-check the cleanup path anyways,
since const-eval already has "abort-on-panic" semantics and there's
often drops that would otherwise be forbidden, so the check wasn't
really preventing anything anyways.
  • Loading branch information
ecstatic-morse committed Oct 3, 2020
commit 98a2292919147d775ec196f42fe821b600180019
12 changes: 0 additions & 12 deletions compiler/rustc_mir/src/transform/check_consts/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@ pub trait NonConstOp: std::fmt::Debug {
fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx>;
}

#[derive(Debug)]
pub struct Abort;
impl NonConstOp for Abort {
fn status_in_item(&self, ccx: &ConstCx<'_, '_>) -> Status {
mcf_status_in_item(ccx)
}

fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> {
mcf_build_error(ccx, span, "abort is not stable in const fn")
}
}

#[derive(Debug)]
pub struct FloatingPointOp;
impl NonConstOp for FloatingPointOp {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_mir/src/transform/check_consts/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,13 +874,13 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
}

TerminatorKind::InlineAsm { .. } => self.check_op(ops::InlineAsm),
TerminatorKind::Abort => self.check_op(ops::Abort),

TerminatorKind::GeneratorDrop | TerminatorKind::Yield { .. } => {
self.check_op(ops::Generator(hir::GeneratorKind::Gen))
}

TerminatorKind::Assert { .. }
TerminatorKind::Abort
| TerminatorKind::Assert { .. }
| TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. }
| TerminatorKind::Goto { .. }
Expand Down