Skip to content

Commit 2aa4c46

Browse files
committed
Auto merge of #58795 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
Revert abort on unwinding through FFI on stable This is entirely done to allow us more time for discussion about what behavior we want to specify here.
2 parents b270e14 + bd1f032 commit 2aa4c46

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

RELEASES.md

+23-21
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Version 1.33.0 (2019-02-28)
44
Language
55
--------
66
- [You can now use the `cfg(target_vendor)` attribute.][57465] E.g.
7-
`#[cfg(target_vendor="linux")] fn main() { println!("Hello Linux!"); }`
7+
`#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }`
88
- [Integer patterns such as in a match expression can now be exhaustive.][56362]
99
E.g. You can have match statement on a `u8` that covers `0..=255` and
10-
you would no longer be required to have a `_ => unreachable!()` case.
10+
you would no longer be required to have a `_ => unreachable!()` case.
1111
- [You can now have multiple patterns in `if let` and `while let`
1212
expressions.][57532] You can do this with the same syntax as a `match`
1313
expression. E.g.
@@ -51,8 +51,7 @@ Language
5151
// Allowed as there is only one `Read` in the module.
5252
pub trait Read {}
5353
```
54-
- [`extern` functions will now abort by default when panicking.][55982]
55-
This was previously undefined behaviour.
54+
- [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805].
5655

5756
Compiler
5857
--------
@@ -109,27 +108,30 @@ Compatibility Notes
109108
are now deprecated in the standard library, and their usage will now produce a warning.
110109
Please use the `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}`
111110
methods instead.
111+
- The `Error::cause` method has been deprecated in favor of `Error::source` which supports
112+
downcasting.
112113

113-
[57615]: https://github.com/rust-lang/rust/pull/57615/
114-
[57465]: https://github.com/rust-lang/rust/pull/57465/
115-
[57532]: https://github.com/rust-lang/rust/pull/57532/
116-
[57535]: https://github.com/rust-lang/rust/pull/57535/
117-
[57566]: https://github.com/rust-lang/rust/pull/57566/
114+
[55982]: https://github.com/rust-lang/rust/pull/55982/
115+
[56303]: https://github.com/rust-lang/rust/pull/56303/
116+
[56351]: https://github.com/rust-lang/rust/pull/56351/
117+
[56362]: https://github.com/rust-lang/rust/pull/56362
118+
[56642]: https://github.com/rust-lang/rust/pull/56642/
119+
[56769]: https://github.com/rust-lang/rust/pull/56769/
120+
[56805]: https://github.com/rust-lang/rust/pull/56805
121+
[56947]: https://github.com/rust-lang/rust/pull/56947/
122+
[57049]: https://github.com/rust-lang/rust/pull/57049/
123+
[57067]: https://github.com/rust-lang/rust/pull/57067/
124+
[57105]: https://github.com/rust-lang/rust/pull/57105
118125
[57130]: https://github.com/rust-lang/rust/pull/57130/
119126
[57167]: https://github.com/rust-lang/rust/pull/57167/
120127
[57175]: https://github.com/rust-lang/rust/pull/57175/
121128
[57234]: https://github.com/rust-lang/rust/pull/57234/
122129
[57332]: https://github.com/rust-lang/rust/pull/57332/
123-
[56947]: https://github.com/rust-lang/rust/pull/56947/
124-
[57049]: https://github.com/rust-lang/rust/pull/57049/
125-
[57067]: https://github.com/rust-lang/rust/pull/57067/
126-
[56769]: https://github.com/rust-lang/rust/pull/56769/
127-
[56642]: https://github.com/rust-lang/rust/pull/56642/
128-
[56303]: https://github.com/rust-lang/rust/pull/56303/
129-
[56351]: https://github.com/rust-lang/rust/pull/56351/
130-
[55982]: https://github.com/rust-lang/rust/pull/55982/
131-
[56362]: https://github.com/rust-lang/rust/pull/56362
132-
[57105]: https://github.com/rust-lang/rust/pull/57105
130+
[57465]: https://github.com/rust-lang/rust/pull/57465/
131+
[57532]: https://github.com/rust-lang/rust/pull/57532/
132+
[57535]: https://github.com/rust-lang/rust/pull/57535/
133+
[57566]: https://github.com/rust-lang/rust/pull/57566/
134+
[57615]: https://github.com/rust-lang/rust/pull/57615/
133135
[cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/
134136
[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
135137
[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at
@@ -170,7 +172,7 @@ Language
170172
- [You can now match against literals in macros with the `literal`
171173
specifier.][56072] This will match against a literal of any type.
172174
E.g. `1`, `'A'`, `"Hello World"`
173-
- [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g.
175+
- [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g.
174176
```rust
175177
struct Point(i32, i32);
176178

@@ -460,7 +462,7 @@ Version 1.31.0 (2018-12-06)
460462

461463
Language
462464
--------
463-
- 🎉 [This version marks the release of the 2018 edition of Rust.][54057] 🎉
465+
- 🎉 [This version marks the release of the 2018 edition of Rust.][54057] 🎉
464466
- [New lifetime elision rules now allow for eliding lifetimes in functions and
465467
impl headers.][54778] E.g. `impl<'a> Reader for BufReader<'a> {}` can now be
466468
`impl Reader for BufReader<'_> {}`. Lifetimes are still required to be defined

src/librustc_mir/build/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ fn should_abort_on_panic<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
611611
// unwind anyway. Don't stop them.
612612
let attrs = &tcx.get_attrs(fn_def_id);
613613
match attr::find_unwind_attr(Some(tcx.sess.diagnostic()), attrs) {
614-
None => true,
614+
None => false, // FIXME(#58794)
615615
Some(UnwindAttr::Allowed) => false,
616616
Some(UnwindAttr::Aborts) => true,
617617
}

src/test/run-pass/abort-on-c-abi.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![allow(unused_must_use)]
2+
#![feature(unwind_attributes)]
23
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
34
// we never unwind through them.
45

@@ -10,6 +11,7 @@ use std::io::prelude::*;
1011
use std::io;
1112
use std::process::{Command, Stdio};
1213

14+
#[unwind(aborts)] // FIXME(#58794)
1315
extern "C" fn panic_in_ffi() {
1416
panic!("Test");
1517
}

0 commit comments

Comments
 (0)