Commit Graph

42 Commits

Author SHA1 Message Date
Ralf Jung
3c48579551 more panicking comments 2019-11-25 23:55:54 +01:00
Ralf Jung
6440b94253 make comment compile 2019-11-24 13:15:22 +01:00
Ralf Jung
35ee6bd59b panicking comments 2019-11-24 11:26:07 +01:00
Mark Rousskov
997feacddd Snap cfgs 2019-11-12 16:36:57 -05:00
Oliver Scherer
02f9167f94 Have tidy ensure that we document all unsafe blocks in libcore 2019-11-06 11:04:42 +01:00
Adam Perry
aec97e050e Panicking infra uses &core::panic::Location.
This allows us to remove `static_panic_msg` from the SSA<->LLVM
boundary, along with its fat pointer representation for &str.

Also changes the signature of PanicInfo::internal_contructor to
avoid copying.

Closes #65856.
2019-10-27 12:50:58 -07:00
Mark Rousskov
f359a94849 Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
Alex Crichton
1a8897fd8a Fix rebase conflicts 2019-09-23 09:35:50 -07:00
Josh Stone
9f374da467 Exempt extern "Rust" from improper_ctypes
It should be fine for Rust ABIs to involve any Rust type.
2019-09-20 15:39:34 -07:00
Mazdak Farrokhzad
dbfbadeac4 libcore: deny more... 2019-04-19 01:37:12 +02:00
Taiki Endo
360432f1e8 libcore => 2018 2019-04-18 14:47:35 +09:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Vitaly _Vi Shukela
f18a8c6163
Fix exceeding line width limit 2018-11-30 02:37:04 +03:00
Vitaly _Vi Shukela
d3f9788e59
panic_immediate_abort: Fix issues from review 2018-11-30 02:17:05 +03:00
Vitaly _Vi Shukela
fdef3848a0
Add libstd and libcore Cargo features "panic_immediate_abort"
It stop asserts and panics from libstd to automatically
include string output and formatting code.

Use case: developing static executables smaller than 50 kilobytes,
where usual formatting code is excessive while keeping debuggability
in debug mode.

May resolve #54981.
2018-11-30 00:56:41 +03:00
Mark Simulacrum
ad97f8b491 Bootstrap from 1.28.0-beta.3 2018-06-30 13:17:49 -07:00
Jorge Aparicio
430ad76900 undo payload in core::panic! changes 2018-06-03 13:46:19 +02:00
Jorge Aparicio
eb19361416 document that panic_impl never passes the FFI boundary 2018-06-03 13:46:19 +02:00
Jorge Aparicio
b442348d53 remove unused struct NoPayload 2018-06-03 13:46:19 +02:00
Jorge Aparicio
e44ad61a2d implement #[panic_implementation] 2018-06-03 13:46:19 +02:00
Alex Crichton
8958815916 Bump the bootstrap compiler to 1.26.0 beta
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-05 07:13:45 -07:00
Niko Matsakis
a47fd3df89 make #[unwind] attribute specify expectations more clearly
You can now choose between the following:

- `#[unwind(allowed)]`
- `#[unwind(aborts)]`

Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though
I think we should change this eventually.
2018-02-20 19:12:52 -05:00
Alex Crichton
9010567dcc Bump master to 1.21.0
This commit bumps the master branch's version to 1.21.0 and also updates the
bootstrap compiler from the freshly minted beta release.
2017-07-25 07:03:19 -07:00
est31
57f0514feb Style fix 2017-07-02 13:53:29 +02:00
est31
eb5fb21bd5 Fix the test failure, add comment, and refactor a little bit 2017-07-02 13:53:29 +02:00
est31
da887074fc Output line column info when panicking 2017-07-02 13:53:29 +02:00
kennytm
4711982314
Removed as many "```ignore" as possible.
Replaced by adding extra imports, adding hidden code (`# ...`), modifying
examples to be runnable (sorry Homura), specifying non-Rust code, and
converting to should_panic, no_run, or compile_fail.

Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-23 15:31:53 +08:00
Björn Steinbrink
3ef75d5774 Mark all extern functions as nounwind
Unwinding across an FFI boundary is undefined behaviour, so we can mark
all external function as nounwind. The obvious exception are those
functions that actually perform the unwinding.
2015-09-14 11:36:09 +02:00
Alex Crichton
b7dcf272d9 core: Fill out issues for unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
c14d86fd3f core: Split apart the global core feature
This commit shards the broad `core` feature of the libcore library into finer
grained features. This split groups together similar APIs and enables tracking
each API separately, giving a better sense of where each feature is within the
stabilization process.

A few minor APIs were deprecated along the way:

* Iterator::reverse_in_place
* marker::NoCopy
2015-06-17 09:06:59 -07:00
Nick Hamann
a1898f890d Convert #[lang="..."] to #[lang = "..."]
In my opinion this looks nicer, but also it matches the whitespace generally
used for stability markers more closely.
2015-05-09 14:50:28 -05:00
Ryan Prichard
ef25b7d538 Change the rt::unwind line argument type from usize to u32. 2015-04-11 02:46:57 -07:00
Alex Crichton
43bfaa4a33 Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
Ryan Prichard
9c0057df58 Remove core::panicking::panic's dependence on str's Display::fmt impl
Display::fmt for str calls into Formatter::pad, which is modest in size
and also pulls in string-related functions for its truncation and padding
abilities.  For size-critical programs (e.g. embedded), this call site
may be the only reason Formatter::pad is linked into the output.
2015-03-10 22:21:30 -07:00
Flavio Percoco
9d0d72345d register snapshot 880fb89 2015-02-27 01:48:49 +01:00
Brian Brooks
fc9fa1a563 Resolve barriers to changing column!() / line!() return type to u32 in #19284 . Address review comments in #21769 . 2015-02-21 17:26:29 -05:00
Alex Crichton
262c1efe63 Register new snapshots 2014-12-30 15:04:43 -08:00
Eduard Burtescu
647e54d6d1 Fallout of changing format_args!(f, args) to f(format_args!(args)). 2014-12-27 23:57:43 +02:00
Eduard Burtescu
56dbf3d122 Register snapshots. 2014-11-05 12:55:58 +02:00
Alex Crichton
6fcba8826f Test fixes and rebase conflicts 2014-10-30 17:37:56 -07:00
Steve Klabnik
6ac7fc73f5 Update infrastructure for fail -> panic
This includes updating the language items and marking what needs to
change after a snapshot.

If you do not use the standard library, the language items you need to
implement have changed. For example:

```rust
 #[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} }
```

is now

```rust
 #[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
```

Related, lesser-implemented language items `fail` and
`fail_bounds_check` have become `panic` and `panic_bounds_check`, as
well. These are implemented by `libcore`, so it is unlikely (though
possible!) that these two renamings will affect you.

[breaking-change]

Fix test suite
2014-10-29 16:06:13 -04:00
Steve Klabnik
7828c3dd28 Rename fail! to panic!
https://github.com/rust-lang/rfcs/pull/221

The current terminology of "task failure" often causes problems when
writing or speaking about code. You often want to talk about the
possibility of an operation that returns a Result "failing", but cannot
because of the ambiguity with task failure. Instead, you have to speak
of "the failing case" or "when the operation does not succeed" or other
circumlocutions.

Likewise, we use a "Failure" header in rustdoc to describe when
operations may fail the task, but it would often be helpful to separate
out a section describing the "Err-producing" case.

We have been steadily moving away from task failure and toward Result as
an error-handling mechanism, so we should optimize our terminology
accordingly: Result-producing functions should be easy to describe.

To update your code, rename any call to `fail!` to `panic!` instead.
Assuming you have not created your own macro named `panic!`, this
will work on UNIX based systems:

    grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g'

You can of course also do this by hand.

[breaking-change]
2014-10-29 11:43:07 -04:00