diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index f36102fdc73f0..e6e706d4819a4 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -673,7 +673,7 @@ declare_features! ( /// Allows inconsistent bounds in where clauses. (unstable, trivial_bounds, "1.28.0", Some(48214)), /// Allows using `try {...}` expressions. - (unstable, try_blocks, "1.29.0", Some(31436)), + (unstable, try_blocks, "1.29.0", Some(154391)), /// Allows using `try bikeshed TargetType {...}` expressions. (unstable, try_blocks_heterogeneous, "1.94.0", Some(149488)), /// Allows `impl Trait` to be used inside type aliases (RFC 2515). diff --git a/src/doc/unstable-book/src/language-features/try-blocks.md b/src/doc/unstable-book/src/language-features/try-blocks.md index e342c260a739b..f72467f06476f 100644 --- a/src/doc/unstable-book/src/language-features/try-blocks.md +++ b/src/doc/unstable-book/src/language-features/try-blocks.md @@ -1,8 +1,8 @@ # `try_blocks` -The tracking issue for this feature is: [#31436] +The tracking issue for this feature is: [#154391] -[#31436]: https://github.com/rust-lang/rust/issues/31436 +[#154391]: https://github.com/rust-lang/rust/issues/154391 ------------------------ @@ -14,14 +14,14 @@ block creates a new scope one can use the `?` operator in. use std::num::ParseIntError; -let result: Result = try { +let result = try { "1".parse::()? + "2".parse::()? + "3".parse::()? }; assert_eq!(result, Ok(6)); -let result: Result = try { +let result = try { "1".parse::()? + "foo".parse::()? + "3".parse::()? diff --git a/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs b/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs index dedc12aa653fd..9e6d58600888c 100644 --- a/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs +++ b/src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs @@ -11576,9 +11576,9 @@ The tracking issue for this feature is: [#85731] label: "try_blocks", description: r##"# `try_blocks` -The tracking issue for this feature is: [#31436] +The tracking issue for this feature is: [#154391] -[#31436]: https://github.com/rust-lang/rust/issues/31436 +[#154391]: https://github.com/rust-lang/rust/issues/154391 ------------------------ @@ -11590,14 +11590,14 @@ block creates a new scope one can use the `?` operator in. use std::num::ParseIntError; -let result: Result = try { +let result = try { "1".parse::()? + "2".parse::()? + "3".parse::()? }; assert_eq!(result, Ok(6)); -let result: Result = try { +let result = try { "1".parse::()? + "foo".parse::()? + "3".parse::()? diff --git a/tests/ui/README.md b/tests/ui/README.md index 3ebbe4918a2de..47bfdeab53dcb 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -1462,7 +1462,7 @@ Tests for the `#[doc(hidden)]` items. ## `tests/ui/try-block/` -`#![feature(try_blocks)]`. See [Tracking issue for `?` operator and `try` blocks (RFC 243, `question_mark` & `try_blocks` features)](https://github.com/rust-lang/rust/issues/31436). +`#![feature(try_blocks)]` & `#![feature(try_blocks_heterogeneous)]`. See [Tracking Issue for homogeneous `try_blocks`](https://github.com/rust-lang/rust/issues/154391) & [Experimental Tracking Issue for Heterogeneous Try Blocks](https://github.com/rust-lang/rust/issues/149488). ## `tests/ui/try-trait/` diff --git a/tests/ui/feature-gates/feature-gate-try_blocks.stderr b/tests/ui/feature-gates/feature-gate-try_blocks.stderr index dbef7fbe9d25e..0a7580df61c0f 100644 --- a/tests/ui/feature-gates/feature-gate-try_blocks.stderr +++ b/tests/ui/feature-gates/feature-gate-try_blocks.stderr @@ -8,7 +8,7 @@ LL | | x LL | | }; | |_____^ | - = note: see issue #31436 for more information + = note: see issue #154391 for more information = help: add `#![feature(try_blocks)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui/try-block/try-block-homogeneous-pre-expansion.stderr b/tests/ui/try-block/try-block-homogeneous-pre-expansion.stderr index dc92d7e64aff3..67cbcb42fb479 100644 --- a/tests/ui/try-block/try-block-homogeneous-pre-expansion.stderr +++ b/tests/ui/try-block/try-block-homogeneous-pre-expansion.stderr @@ -4,7 +4,7 @@ warning: `try` blocks are unstable LL | try {} | ^^^^^^ | - = note: see issue #31436 for more information + = note: see issue #154391 for more information = help: add `#![feature(try_blocks)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error!