Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow raw identifiers e.g. r#mod #149

Merged
merged 4 commits into from
Apr 11, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add UI test
  • Loading branch information
ascjones committed Apr 11, 2022
commit f944f94ed6148798eff5c70cac7ae677e0fa39bb
21 changes: 21 additions & 0 deletions test_suite/tests/ui/pass_raw_identifers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use info::{self as scale_info};
use scale_info::TypeInfo;

#[allow(dead_code, non_camel_case_types)]
mod r#mod {
use super::*;
#[derive(TypeInfo)]
pub enum r#enum {
r#true,
}
#[derive(TypeInfo)]
pub struct r#struct {
r#try: r#enum,
}
}

fn assert_type_info<T: TypeInfo + 'static>() {}

fn main() {
assert_type_info::<r#mod::r#struct>();
}