Implement RFC#1559: allow all literals in attributes.
This commit is contained in:
parent
528c6f3ed6
commit
8250a26b5b
45 changed files with 942 additions and 373 deletions
|
@ -141,6 +141,7 @@ pub fn run(input: &str,
|
|||
// Look for #![doc(test(no_crate_inject))], used by crates in the std facade
|
||||
fn scrape_test_config(krate: &::rustc::hir::Crate) -> TestOptions {
|
||||
use syntax::attr::AttrMetaMethods;
|
||||
use syntax::attr::AttrNestedMetaItemMethods;
|
||||
use syntax::print::pprust;
|
||||
|
||||
let mut opts = TestOptions {
|
||||
|
@ -162,7 +163,7 @@ fn scrape_test_config(krate: &::rustc::hir::Crate) -> TestOptions {
|
|||
if attr.check_name("attr") {
|
||||
if let Some(l) = attr.meta_item_list() {
|
||||
for item in l {
|
||||
opts.attrs.push(pprust::meta_item_to_string(item));
|
||||
opts.attrs.push(pprust::meta_list_item_to_string(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue