diff options
| author | bors <bors@rust-lang.org> | 2020-03-13 19:16:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-13 19:16:03 +0000 |
| commit | 1572c433eed495d0ade41511ae106b180e02851d (patch) | |
| tree | 7f39caac777b04c27f8a6a63dbad558fa6b14e29 /src/librustc_error_codes/error_codes | |
| parent | d6072319a9fbeffea2ebe803ddaedbcf566ab5dd (diff) | |
| parent | 1d8f5f0ff5882c2a8cd739eb901cea0ea3c437d4 (diff) | |
| download | rust-1572c433eed495d0ade41511ae106b180e02851d.tar.gz rust-1572c433eed495d0ade41511ae106b180e02851d.zip | |
Auto merge of #69986 - JohnTitor:rollup-h0809mf, r=JohnTitor
Rollup of 12 pull requests Successful merges: - #69403 (Implement `Copy` for `IoSlice`) - #69460 (Move some `build-pass` tests to `check-pass`) - #69723 (Added doc on keyword Pub.) - #69802 (fix more clippy findings) - #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes)) - #69947 (Clean up E0423 explanation) - #69949 (triagebot.toml: add ping aliases) - #69954 (rename panic_if_ intrinsics to assert_) - #69960 (miri engine: fix treatment of abort intrinsic) - #69966 (Add more regression tests) - #69973 (Update stable-since version for const_int_conversion) - #69974 (Clean up E0434 explanation) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0423.md | 3 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0434.md | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/librustc_error_codes/error_codes/E0423.md b/src/librustc_error_codes/error_codes/E0423.md index 6a7c31f5e0d..a98ada17a46 100644 --- a/src/librustc_error_codes/error_codes/E0423.md +++ b/src/librustc_error_codes/error_codes/E0423.md @@ -1,8 +1,7 @@ An identifier was used like a function name or a value was expected and the identifier exists but it belongs to a different namespace. -For (an erroneous) example, here a `struct` variant name were used as a -function: +Erroneous code example: ```compile_fail,E0423 struct Foo { a: bool }; diff --git a/src/librustc_error_codes/error_codes/E0434.md b/src/librustc_error_codes/error_codes/E0434.md index e093f0796da..8fd60412baf 100644 --- a/src/librustc_error_codes/error_codes/E0434.md +++ b/src/librustc_error_codes/error_codes/E0434.md @@ -1,6 +1,4 @@ -This error indicates that a variable usage inside an inner function is invalid -because the variable comes from a dynamic environment. Inner functions do not -have access to their containing environment. +A variable used inside an inner function comes from a dynamic environment. Erroneous code example: @@ -14,8 +12,8 @@ fn foo() { } ``` -Functions do not capture local variables. To fix this error, you can replace the -function with a closure: +Inner functions do not have access to their containing environment. To fix this +error, you can replace the function with a closure: ``` fn foo() { @@ -26,7 +24,7 @@ fn foo() { } ``` -or replace the captured variable with a constant or a static item: +Or replace the captured variable with a constant or a static item: ``` fn foo() { |
