From b38a856e3851cd9557a5d79f524cc2e69c5664fc Mon Sep 17 00:00:00 2001 From: mitaa Date: Tue, 23 Feb 2016 09:52:44 +0100 Subject: Don't show associated consts from trait impls --- src/test/rustdoc/issue-31808.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/test/rustdoc/issue-31808.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/issue-31808.rs b/src/test/rustdoc/issue-31808.rs new file mode 100644 index 00000000000..46be8229d7c --- /dev/null +++ b/src/test/rustdoc/issue-31808.rs @@ -0,0 +1,23 @@ +// Copyright 2016 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(associated_consts, associated_types)] + +// Test that associated item impls on primitive types don't crash rustdoc + +pub trait Foo { + const BAR: usize; + type BAZ; +} + +impl Foo for () { + const BAR: usize = 0; + type BAZ = usize; +} -- cgit 1.4.1-3-g733a5