Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1#![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
2//~^ WARN the feature `generic_const_parameter_types` is incomplete
3//~| WARN the feature `unsized_const_params` is incomplete
4// Make sure that we test the const param type of default const parameters
5// if both the type of the default and the type of the parameter are concrete.
6
7use std::marker::ConstParamTy_;
8
9struct Foo<const N: u32, const M: u64 = N>; //~ ERROR the constant `N` is not of type `u64`
…lines 10–14 unchanged (5 lines)

After

1#![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
2// Make sure that we test the const param type of default const parameters
3// if both the type of the default and the type of the parameter are concrete.
4
5use std::marker::ConstParamTy_;
6
7struct Foo<const N: u32, const M: u64 = N>; //~ ERROR the constant `N` is not of type `u64`
8struct Bar<T: ConstParamTy_, const N: T, const M: u64 = N>(T); // ok
…lines 9–12 unchanged (4 lines)

Before

source_file
inner_attribute_item
# "#"
! "!"
[ "["
attribute
identifier "feature"
token_tree
( "("
identifier "generic_const_parameter_types"
, ","
identifier "unsized_const_params"
, ","
identifier "adt_const_params"
) ")"
] "]"
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "marker"
:: "::"
identifier "ConstParamTy_"
; ";"
struct_item
struct "struct"
type_identifier "Foo"
type_parameters
< "<"
const_parameter
const "const"
identifier "N"
: ":"
primitive_type "u32"
, ","
const_parameter
const "const"
identifier "M"
: ":"
primitive_type "u64"
= "="
identifier "N"
> ">"
; ";"
line_comment
// "//"
struct_item (+30 nodes collapsed)
line_comment
// "//"
struct_item (+30 nodes collapsed)
line_comment
// "//"
function_item
fn "fn"
identifier "main"
parameters
( "("
) ")"
block
{ "{"
} "}"

After

source_file
inner_attribute_item
# "#"
! "!"
[ "["
attribute
identifier "feature"
token_tree
( "("
identifier "generic_const_parameter_types"
, ","
identifier "unsized_const_params"
, ","
identifier "adt_const_params"
) ")"
] "]"
line_comment
// "//"
line_comment
// "//"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "marker"
:: "::"
identifier "ConstParamTy_"
; ";"
struct_item
struct "struct"
type_identifier "Foo"
type_parameters
< "<"
const_parameter
const "const"
identifier "N"
: ":"
primitive_type "u32"
, ","
const_parameter
const "const"
identifier "M"
: ":"
primitive_type "u64"
= "="
identifier "N"
> ">"
; ";"
line_comment
// "//"
struct_item (+30 nodes collapsed)
line_comment
// "//"
struct_item (+30 nodes collapsed)
line_comment
// "//"
function_item
fn "fn"
identifier "main"
parameters
( "("
) ")"
block
{ "{"
} "}"