gccrs: add no mangle generic items lint

Warn when `#[no_mangle]` or `#[export_name]` is applied to a generic
function, since generic items must be mangled and the attribute has no
effect.

gcc/rust/ChangeLog:

	* checks/lints/unused/rust-unused-checker.cc (UnusedChecker::visit):
	Warn on a no-mangle generic function.

gcc/testsuite/ChangeLog:

	* rust/compile/no-mangle-generic-items_0.rs: New test.

Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.com>
2 files changed