-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pretty printer: Added some
run-make
tests of path-suffix lookup fun…
…ctionality.
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-include ../tools.mk | ||
|
||
all: | ||
$(RUSTC) -o $(TMPDIR)/foo.out --pretty normal=foo input.rs | ||
$(RUSTC) -o $(TMPDIR)/nest_foo.out --pretty normal=nest::foo input.rs | ||
$(RUSTC) -o $(TMPDIR)/foo_method.out --pretty normal=foo_method input.rs | ||
diff -u $(TMPDIR)/foo.out foo.pp | ||
diff -u $(TMPDIR)/nest_foo.out nest_foo.pp | ||
diff -u $(TMPDIR)/foo_method.out foo_method.pp |
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,15 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
|
||
pub fn foo() -> i32 { 45 } /* foo */ | ||
|
||
|
||
pub fn foo() -> &'static str { "i am a foo." } /* nest::foo */ |
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,16 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
|
||
|
||
|
||
|
||
fn foo_method(&self) -> &'static str { return "i am very similiar to foo."; } | ||
/* nest::S::foo_method */ |
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,28 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
#![crate_type="lib"] | ||
|
||
pub fn | ||
foo() -> i32 | ||
{ 45 } | ||
|
||
pub fn bar() -> &'static str { "i am not a foo." } | ||
|
||
pub mod nest { | ||
pub fn foo() -> &'static str { "i am a foo." } | ||
|
||
struct S; | ||
impl S { | ||
fn foo_method(&self) -> &'static str { | ||
return "i am very similiar to foo."; | ||
} | ||
} | ||
} |
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,14 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
|
||
|
||
|
||
pub fn foo() -> &'static str { "i am a foo." } /* nest::foo */ |
db0e71f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from huonw
at pnkfelix@db0e71f
db0e71f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging pnkfelix/rust/fsk-add-path-suffix-lookup = db0e71f into auto
db0e71f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnkfelix/rust/fsk-add-path-suffix-lookup = db0e71f merged ok, testing candidate = 87134c7
db0e71f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/753
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/753
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/752
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/753
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/749
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/750
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/749
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/755
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/750
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/749
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/752
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/750
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/750
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/751
db0e71f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 87134c7