Make impl of Add for @[] public
It's not clear that impls should have to be public to be used from outside the crate; in particular, I don't know whether they have to be public to be used from other modules within the same crate.
This commit is contained in:
parent
264e1b2edb
commit
8b13912a83
@ -134,9 +134,9 @@ pub pure fn from_elem<T: Copy>(n_elts: uint, +t: T) -> @[T] {
|
||||
}
|
||||
|
||||
#[cfg(notest)]
|
||||
mod traits {
|
||||
pub mod traits {
|
||||
#[legacy_exports];
|
||||
impl<T: Copy> @[T] : Add<&[const T],@[T]> {
|
||||
pub impl<T: Copy> @[T] : Add<&[const T],@[T]> {
|
||||
#[inline(always)]
|
||||
pure fn add(rhs: & &[const T]) -> @[T] {
|
||||
append(self, (*rhs))
|
||||
@ -249,9 +249,7 @@ pub fn test() {
|
||||
assert from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14];
|
||||
}
|
||||
|
||||
/*
|
||||
#[test]
|
||||
pub fn append_test() {
|
||||
assert @[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6];
|
||||
}
|
||||
*/
|
||||
|
@ -654,6 +654,10 @@ impl CoherenceChecker {
|
||||
module_def_id,
|
||||
None);
|
||||
for (*implementations).each |implementation| {
|
||||
debug!("coherence: adding impl from external crate: %s",
|
||||
ty::item_path_str(self.crate_context.tcx,
|
||||
implementation.did));
|
||||
|
||||
// Make sure we don't visit the same implementation
|
||||
// multiple times.
|
||||
match impls_seen.find(implementation.did) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user