-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sort top-level items and items in impl blocks * Add a test to make sure comments are removed * Replace identifiers of generic parameters with placeholders --------- Co-authored-by: Remo Senekowitsch <[email protected]>
- Loading branch information
1 parent
b4a7504
commit 34a58c4
Showing
27 changed files
with
288 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"PLACEHOLDER_1": "MAX", | ||
"PLACEHOLDER_2": "KEYWORDS" | ||
"PLACEHOLDER_1": "KEYWORDS", | ||
"PLACEHOLDER_2": "MAX" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const PLACEHOLDER_1: u16 = 65535; | ||
const PLACEHOLDER_2: &'static [&'static str] = &["main"]; | ||
const PLACEHOLDER_1: &'static [&'static str] = &["main"]; | ||
const PLACEHOLDER_2: u16 = 65535; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"PLACEHOLDER_1": "process", | ||
"PLACEHOLDER_2": "initialize" | ||
"PLACEHOLDER_1": "initialize", | ||
"PLACEHOLDER_2": "process" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
fn PLACEHOLDER_1(&mut self) {} | ||
pub unsafe fn PLACEHOLDER_2(&self) -> bool {} | ||
pub unsafe fn PLACEHOLDER_1(&self) -> bool {} | ||
fn PLACEHOLDER_2(&mut self) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"PLACEHOLDER_1": "A", | ||
"PLACEHOLDER_2": "B", | ||
"PLACEHOLDER_3": "superb", | ||
"PLACEHOLDER_4": "var_c", | ||
"PLACEHOLDER_5": "One", | ||
"PLACEHOLDER_6": "Test", | ||
"PLACEHOLDER_7": "a", | ||
"PLACEHOLDER_8": "b" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
impl<PLACEHOLDER_1, PLACEHOLDER_2> Test<PLACEHOLDER_1, PLACEHOLDER_2> { | ||
fn PLACEHOLDER_3() { | ||
let PLACEHOLDER_4 = 3; | ||
} | ||
} | ||
struct PLACEHOLDER_5<PLACEHOLDER_1>(PLACEHOLDER_1); | ||
struct PLACEHOLDER_6<PLACEHOLDER_1, PLACEHOLDER_2> { | ||
PLACEHOLDER_7: PLACEHOLDER_1, | ||
PLACEHOLDER_8: PLACEHOLDER_2, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
struct One<A>(A); | ||
struct Test<A, B> { | ||
a: A, | ||
b: B | ||
} | ||
impl<A, B> Test<A, B> { | ||
fn superb() { | ||
let var_c = 3; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"PLACEHOLDER_1": "a", | ||
"PLACEHOLDER_2": "A", | ||
"PLACEHOLDER_3": "B", | ||
"PLACEHOLDER_4": "C" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
impl C for A { | ||
fn PLACEHOLDER_1(&self) { | ||
let PLACEHOLDER_1 = 10; | ||
} | ||
} | ||
struct PLACEHOLDER_2 { | ||
PLACEHOLDER_1: i32, | ||
} | ||
enum PLACEHOLDER_3 { | ||
PLACEHOLDER_2, | ||
} | ||
trait PLACEHOLDER_4 { | ||
fn PLACEHOLDER_1(&self); | ||
} | ||
fn main() { | ||
let PLACEHOLDER_1 = 10; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Superb function | ||
fn main() { | ||
// Superb variable | ||
let a = 10; | ||
} | ||
|
||
// Superb struct | ||
struct A { | ||
// Superb field | ||
a: i32, | ||
} | ||
|
||
// Superb enum | ||
enum B { | ||
// Superb variant | ||
A, | ||
} | ||
|
||
// Superb trait | ||
trait C { | ||
// Superb method | ||
fn a(&self); | ||
} | ||
|
||
// Superb impl | ||
impl C for A { | ||
// Superb method | ||
fn a(&self) { | ||
// Superb expression | ||
let a = 10; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"PLACEHOLDER_1": "Example", | ||
"PLACEHOLDER_1": "answer", | ||
"PLACEHOLDER_2": "number", | ||
"PLACEHOLDER_3": "boo", | ||
"PLACEHOLDER_4": "answer", | ||
"PLACEHOLDER_5": "get_number" | ||
"PLACEHOLDER_4": "get_number", | ||
"PLACEHOLDER_5": "Example" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
struct PLACEHOLDER_1 { | ||
PLACEHOLDER_2: i32, | ||
} | ||
impl PLACEHOLDER_1 { | ||
impl Example { | ||
fn PLACEHOLDER_1(&mut self) { | ||
self.PLACEHOLDER_2 += 42; | ||
} | ||
fn PLACEHOLDER_3() { | ||
println!("boo! Example::boo() was called!"); | ||
} | ||
fn PLACEHOLDER_4(&mut self) { | ||
self.PLACEHOLDER_2 += 42; | ||
} | ||
fn PLACEHOLDER_5(&self) -> i32 { | ||
fn PLACEHOLDER_4(&self) -> i32 { | ||
self.PLACEHOLDER_2 | ||
} | ||
} | ||
struct PLACEHOLDER_5 { | ||
PLACEHOLDER_2: i32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"PLACEHOLDER_1": "amazing", | ||
"PLACEHOLDER_10": "b", | ||
"PLACEHOLDER_11": "var_b", | ||
"PLACEHOLDER_2": "var_d", | ||
"PLACEHOLDER_3": "beautiful", | ||
"PLACEHOLDER_4": "var_e", | ||
"PLACEHOLDER_5": "superb", | ||
"PLACEHOLDER_6": "var_c", | ||
"PLACEHOLDER_7": "Test", | ||
"PLACEHOLDER_8": "a", | ||
"PLACEHOLDER_9": "var_a" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": 1 | ||
} |
Oops, something went wrong.