Skip to content

Commit

Permalink
adjust E0303 error code docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Dec 23, 2019
1 parent 371446c commit acfe582
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/librustc_error_codes/error_codes/E0303.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#### Note: this error code is no longer emitted by the compiler.

Sub-bindings, e.g. `ref x @ Some(ref y)` are now allowed under
`#![feature(bindings_after_at)]` and checked to make sure that
memory safety is upheld.

--------------

In certain cases it is possible for sub-bindings to violate memory safety.
Updates to the borrow checker in a future version of Rust may remove this
restriction, but for now patterns must be rewritten without sub-bindings.

Before:

```compile_fail,E0303
```compile_fail
match Some("hi".to_string()) {
ref op_string_ref @ Some(s) => {},
None => {},
Expand Down

0 comments on commit acfe582

Please sign in to comment.