diff options
| author | bors <bors@rust-lang.org> | 2017-09-03 16:25:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-03 16:25:46 +0000 |
| commit | c8642daf93f725685309fc12f9d0908fec54b63a (patch) | |
| tree | 36cdc2201fae2bc78a1c9a765c1c1534cf41b201 /src/rustllvm/PassWrapper.cpp | |
| parent | 2f2b8b34c2a1e585117714f99b3858da5f1b92b5 (diff) | |
| parent | 291b4eddcefd1d6da1010f8a1f02f05338a44050 (diff) | |
| download | rust-c8642daf93f725685309fc12f9d0908fec54b63a.tar.gz rust-c8642daf93f725685309fc12f9d0908fec54b63a.zip | |
Auto merge of #44191 - arielb1:on-unimplemented-label, r=nikomatsakis
More general `on_unimplemented`, with uses in `Try`
Allow `on_unimplemented` directives to specify both the label and the primary message of the trait error, and allow them to be controlled by flags - currently only to be desugaring-sensitive.
e.g.
```Rust
#[rustc_on_unimplemented(
on(all(direct, from_desugaring="?"),
message="the `?` operator can only be used in a \
function that returns `Result` \
(or another type that implements `{Try}`)",
label="cannot use the `?` operator in a function that returns `{Self}`"),
)]
```
r? @nikomatsakis
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
