Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
c5c05c2528944e64bea76cb9e07e2aeb4be3cb15
rust/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs

19 lines
280 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-pass
Add `#![allow(..)]` as necessary to get re-migrated run-pass tests compiling with clean stderr again. Most were added mechanically.
2018-09-25 23:51:35 +02:00
#![allow(unreachable_patterns)]
Remove box syntax from most places in src/test outside of the issues dir
2021-08-25 02:39:40 +02:00
#![feature(box_patterns)]
implement pattern-binding-modes RFC See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
2017-10-06 16:30:23 -04:00
struct Foo{}
pub fn main() {
Remove box syntax from most places in src/test outside of the issues dir
2021-08-25 02:39:40 +02:00
let b = Box::new(Foo{});
implement pattern-binding-modes RFC See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
2017-10-06 16:30:23 -04:00
let box f = &b;
let _: &Foo = f;
match &&&b {
box f => {
let _: &Foo = f;
},
_ => panic!(),
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5199ms Template: 8ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API