xso-proc: remove Span information from generated type names
By removing that, the lint won't trigger for identifiers with trailing underscores (which become then embedded underscores which normally trips the `non_camel_case_types` lint).
This commit is contained in:
parent
3089832090
commit
507a3df652
2 changed files with 6 additions and 3 deletions
|
|
@ -611,6 +611,9 @@ fn renamed_types_get_renamed() {
|
||||||
assert!(std::mem::size_of::<RenamedIter>() >= 0);
|
assert!(std::mem::size_of::<RenamedIter>() >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// What is this, you may wonder?
|
||||||
|
// This is a test that any generated type names won't trigger
|
||||||
|
// the `non_camel_case_types` lint.
|
||||||
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
|
#[derive(FromXml, AsXml, PartialEq, Debug, Clone)]
|
||||||
#[xml(namespace = NS1, name = "elem")]
|
#[xml(namespace = NS1, name = "elem")]
|
||||||
struct Foo_;
|
struct LintTest_;
|
||||||
|
|
|
||||||
|
|
@ -77,12 +77,12 @@ impl StructDef {
|
||||||
|
|
||||||
let builder_ty_ident = match meta.builder {
|
let builder_ty_ident = match meta.builder {
|
||||||
Some(v) => v,
|
Some(v) => v,
|
||||||
None => quote::format_ident!("{}FromXmlBuilder", ident),
|
None => quote::format_ident!("{}FromXmlBuilder", ident.to_string()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let item_iter_ty_ident = match meta.iterator {
|
let item_iter_ty_ident = match meta.iterator {
|
||||||
Some(v) => v,
|
Some(v) => v,
|
||||||
None => quote::format_ident!("{}AsXmlIterator", ident),
|
None => quote::format_ident!("{}AsXmlIterator", ident.to_string()),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue