Skip to content

Undocumented: Identifier r#move cannot be used as the name of a constant #137128

Closed
@wuwbobo2021

Description

@wuwbobo2021

Location

https://doc.rust-lang.org/reference/items/constant-items.html

Summary

//const r#move : i32 = 17760257; // It does not compile
fn main() {
    fn r#move() {} // It does compile
}
   Compiling playground v0.0.1 (/playground)
error: expected item, found keyword `const`
 --> src/main.rs:1:1
  |
1 | const r#move : i32 = 17760257;
  | ^^^^^ expected item
  |
  = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>

error: could not compile `playground` (bin "playground") due to 1 previous error

This may cause problem in generated bindings for APIs in other languages.

https://developer.android.com/reference/android/R.transition.html#move

Metadata

Metadata

Assignees

Labels

A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.S-has-bisectionStatus: A bisection has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions