1
Fork 0

rustc_builtin_macros: remove ref patterns

... and other pattern matching improvements
This commit is contained in:
Maybe Waffle 2022-12-06 13:22:36 +00:00
parent 244990a6e9
commit 700c095306
16 changed files with 177 additions and 197 deletions

View file

@ -53,7 +53,7 @@ pub fn expand_env<'cx>(
tts: TokenStream,
) -> Box<dyn base::MacResult + 'cx> {
let mut exprs = match get_exprs_from_tts(cx, sp, tts) {
Some(ref exprs) if exprs.is_empty() => {
Some(exprs) if exprs.is_empty() => {
cx.span_err(sp, "env! takes 1 or 2 arguments");
return DummyResult::any(sp);
}