Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/span/macro-ty-params.rs

16 lines
361 B
Rust
Raw Normal View History

Give span to angle bracketed generic arguments
2017-07-23 20:50:56 +03:00
macro_rules! m {
($p1: path) => {
#[derive($p1)] struct U;
}
}
Do not abort compilation if expansion produces errors Fix a number of uncovered deficiencies in diagnostics
2018-12-16 20:23:27 +03:00
macro_rules! foo { () => () }
Give span to angle bracketed generic arguments
2017-07-23 20:50:56 +03:00
fn main() {
Merge cfail and ui tests into ui tests
2017-11-20 13:13:27 +01:00
foo::<T>!(); //~ ERROR generic arguments in macro path
foo::<>!(); //~ ERROR generic arguments in macro path
Avoid more unnecessary `MetaItem`/`Attribute` conversions. In `Expander::expand` the code currently uses `mk_attr_outer` to convert a `MetaItem` to an `Attribute`, and then follows that with `meta_item_list` which converts back. This commit avoids the unnecessary conversions. There was one wrinkle: the existing conversions caused the bogus `<>` on `Default<>` to be removed. With the conversion gone, we get a second error message about the `<>`. This is a rare case, so I think it probably doesn't matter much.
2022-11-28 11:17:45 +11:00
m!(Default<>);
//~^ ERROR unexpected generic arguments in path
//~^^ ERROR generic arguments in macro path
Give span to angle bracketed generic arguments
2017-07-23 20:50:56 +03:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3546ms Template: 3ms
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