2013-08-28 23:28:06 -07:00
|
|
|
// Copyright 2013 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.
|
|
|
|
|
|
|
|
// original problem
|
2015-03-25 17:06:52 -07:00
|
|
|
pub fn foo<T>() -> isize {
|
2013-08-28 23:28:06 -07:00
|
|
|
{
|
2015-03-25 17:06:52 -07:00
|
|
|
static foo: isize = 2;
|
2013-08-28 23:28:06 -07:00
|
|
|
foo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// issue 8134
|
|
|
|
struct Foo;
|
2015-01-05 15:56:07 -05:00
|
|
|
impl Foo {
|
|
|
|
pub fn foo<T>(&self) {
|
2015-03-25 17:06:52 -07:00
|
|
|
static X: usize = 1;
|
2013-08-28 23:28:06 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// issue 8134
|
2015-02-12 10:29:52 -05:00
|
|
|
pub struct Parser<T>(T);
|
2015-01-02 10:25:54 -05:00
|
|
|
impl<T: std::iter::Iterator<Item=char>> Parser<T> {
|
2013-08-28 23:28:06 -07:00
|
|
|
fn in_doctype(&mut self) {
|
2014-12-20 15:20:51 +13:00
|
|
|
static DOCTYPEPattern: [char; 6] = ['O', 'C', 'T', 'Y', 'P', 'E'];
|
2013-08-28 23:28:06 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar;
|
2015-01-05 15:56:07 -05:00
|
|
|
impl Foo {
|
|
|
|
pub fn bar<T>(&self) {
|
2015-03-25 17:06:52 -07:00
|
|
|
static X: usize = 1;
|
2013-08-28 23:28:06 -07:00
|
|
|
}
|
|
|
|
}
|