about summary refs log tree commit diff
path: root/src/test/ui/rfc-0107-bind-by-move-pattern-guards
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-161/+0
2022-12-21Test the borrowck behavior of if-let guardsLéo Lanteri Thauvin-8/+47
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+2
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2019-09-09Auto merge of #63118 - Centril:stabilize-bind-by-move, r=matthewjasperbors-101/+13
Stabilize `bind_by_move_pattern_guards` in Rust 1.39.0 Closes https://github.com/rust-lang/rust/issues/15287. After stabilizing `#![feature(bind_by_move_pattern_guards)]`, you can now use bind-by-move bindings in patterns and take references to those bindings in `if` guards of `match` expressions. For example, the following now becomes legal: ```rust fn main() { let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]); match array { nums // ---- `nums` is bound by move. if nums.iter().sum::<u8>() == 10 // ^------ `.iter()` implicitly takes a reference to `nums`. => { drop(nums); // --------- Legal as `nums` was bound by move and so we have ownership. } _ => unreachable!(), } } ``` r? @matthewjasper
2019-09-08Update test stderr with results of enabling unused lintsMark Rousskov-2/+2
2019-09-08Update tests wrt. bind_by_by_move_pattern_guards stabilization.Mazdak Farrokhzad-101/+13
2019-07-30Remove 'feature(nll)' from bind_by_move_pattern_guards tests.Mazdak Farrokhzad-23/+21
2019-07-06normalize use of backticks/lowercase in compiler messages for librustc_mirSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532 r? @alexreg
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-2/+2
2019-06-03Update tests for changes to cannot move errorsMatthew Jasper-6/+10
2019-05-12Remove feature(nll) when compare mode is sufficientMatthew Jasper-2/+0
2019-04-22update tests for migrate mode by defaultMatthew Jasper-12/+15
2018-09-17Tests for `feature(bind_by_move_pattern_guards)`.Felix S. Klock II-0/+207
Apparently copyright notices are no longer necessary apparently. (See #43498 and #53654.)