]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #92746 - estebank:question-mark-in-type, r=davidtwco
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 16 Jan 2022 15:58:18 +0000 (16:58 +0100)
committerGitHub <noreply@github.com>
Sun, 16 Jan 2022 15:58:18 +0000 (16:58 +0100)
commit9323a0d1bef9b0708e25f0a8abaf5e5f88599f8d
tree6b4a7fe7ebdf25c0ed07bddc513162b8073c5245
parent9835b90c91e7012f27fc78a60599aab0011d2336
parentcfc0bd12581651e5d0f51d0d4c2d8306cc13cb51
Rollup merge of #92746 - estebank:question-mark-in-type, r=davidtwco

Parse `Ty?` as `Option<Ty>` and provide structured suggestion

Swift has specific syntax that desugars to `Option<T>` similar to our
`?` operator, which means that people might try to use it in Rust. Parse
it and gracefully recover.
compiler/rustc_parse/src/parser/diagnostics.rs